Interface IGrainFactory
Namespace: Orleans
Assembly: Orleans.Core.Abstractions.dll
Syntax
public interface IGrainFactory
Methods
| Improve this Doc View SourceBindGrainReference(IAddressable)
Binds the provided grain reference to this instance.
Declaration
void BindGrainReference(IAddressable grain)
Parameters
Type | Name | Description |
---|---|---|
IAddressable | grain | The grain reference. |
CreateObjectReference<TGrainObserverInterface>(IGrainObserver)
Creates a reference to the provided obj
.
Declaration
Task<TGrainObserverInterface> CreateObjectReference<TGrainObserverInterface>(IGrainObserver obj)where TGrainObserverInterface : IGrainObserver
Parameters
Type | Name | Description |
---|---|---|
IGrainObserver | obj | The object to create a reference to. |
Returns
Type | Description |
---|---|
Task<TGrainObserverInterface> | The reference to |
Type Parameters
Name | Description |
---|---|
TGrainObserverInterface | The specific IGrainObserver type of |
DeleteObjectReference<TGrainObserverInterface>(IGrainObserver)
Deletes the provided object reference.
Declaration
Task DeleteObjectReference<TGrainObserverInterface>(IGrainObserver obj)where TGrainObserverInterface : IGrainObserver
Parameters
Type | Name | Description |
---|---|---|
IGrainObserver | obj | The reference being deleted. |
Returns
Type | Description |
---|---|
Task | A |
Type Parameters
Name | Description |
---|---|
TGrainObserverInterface | The specific IGrainObserver type of |
GetGrain<TGrainInterface>(Guid, String)
Gets a reference to a grain.
Declaration
TGrainInterface GetGrain<TGrainInterface>(Guid primaryKey, string grainClassNamePrefix = null)where TGrainInterface : IGrainWithGuidKey
Parameters
Type | Name | Description |
---|---|---|
Guid | primaryKey | The primary key of the grain. |
System.String | grainClassNamePrefix | An optional class name prefix used to find the runtime type of the grain. |
Returns
Type | Description |
---|---|
TGrainInterface | A reference to the specified grain. |
Type Parameters
Name | Description |
---|---|
TGrainInterface | The interface to get. |
GetGrain<TGrainInterface>(Guid, String, String)
Gets a reference to a grain.
Declaration
TGrainInterface GetGrain<TGrainInterface>(Guid primaryKey, string keyExtension, string grainClassNamePrefix = null)where TGrainInterface : IGrainWithGuidCompoundKey
Parameters
Type | Name | Description |
---|---|---|
Guid | primaryKey | The primary key of the grain. |
System.String | keyExtension | The key extension of the grain. |
System.String | grainClassNamePrefix | An optional class name prefix used to find the runtime type of the grain. |
Returns
Type | Description |
---|---|
TGrainInterface | A reference to the specified grain. |
Type Parameters
Name | Description |
---|---|
TGrainInterface | The interface to get. |
GetGrain<TGrainInterface>(Int64, String)
Gets a reference to a grain.
Declaration
TGrainInterface GetGrain<TGrainInterface>(long primaryKey, string grainClassNamePrefix = null)where TGrainInterface : IGrainWithIntegerKey
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | primaryKey | The primary key of the grain. |
System.String | grainClassNamePrefix | An optional class name prefix used to find the runtime type of the grain. |
Returns
Type | Description |
---|---|
TGrainInterface | A reference to the specified grain. |
Type Parameters
Name | Description |
---|---|
TGrainInterface | The interface to get. |
GetGrain<TGrainInterface>(Int64, String, String)
Gets a reference to a grain.
Declaration
TGrainInterface GetGrain<TGrainInterface>(long primaryKey, string keyExtension, string grainClassNamePrefix = null)where TGrainInterface : IGrainWithIntegerCompoundKey
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | primaryKey | The primary key of the grain. |
System.String | keyExtension | The key extension of the grain. |
System.String | grainClassNamePrefix | An optional class name prefix used to find the runtime type of the grain. |
Returns
Type | Description |
---|---|
TGrainInterface | A reference to the specified grain. |
Type Parameters
Name | Description |
---|---|
TGrainInterface | The interface to get. |
GetGrain<TGrainInterface>(String, String)
Gets a reference to a grain.
Declaration
TGrainInterface GetGrain<TGrainInterface>(string primaryKey, string grainClassNamePrefix = null)where TGrainInterface : IGrainWithStringKey
Parameters
Type | Name | Description |
---|---|---|
System.String | primaryKey | The primary key of the grain. |
System.String | grainClassNamePrefix | An optional class name prefix used to find the runtime type of the grain. |
Returns
Type | Description |
---|---|
TGrainInterface | A reference to the specified grain. |
Type Parameters
Name | Description |
---|---|
TGrainInterface | The interface to get. |