Interface IGrainReferenceRuntime
Runtime logic for GrainReferences to be usable. This service is not meant to be used directly by user code.
Namespace: Orleans.Runtime
Assembly: Orleans.Core.Abstractions.dll
Syntax
public interface IGrainReferenceRuntime
Methods
| Improve this Doc View SourceConvert<TGrainInterface>(IAddressable)
Converts the provided grain to the specified interface.
Declaration
TGrainInterface Convert<TGrainInterface>(IAddressable grain)
Parameters
| Type | Name | Description |
|---|---|---|
| IAddressable | grain | The grain reference being cast. |
Returns
| Type | Description |
|---|---|
| TGrainInterface | A reference to |
Type Parameters
| Name | Description |
|---|---|
| TGrainInterface | The target grain interface type. |
InvokeMethodAsync<T>(GrainReference, Int32, Object[], InvokeMethodOptions, SiloAddress)
Invokes a method on a remote object.
Declaration
Task<T> InvokeMethodAsync<T>(GrainReference reference, int methodId, object[] arguments, InvokeMethodOptions options, SiloAddress silo)
Parameters
| Type | Name | Description |
|---|---|---|
| GrainReference | reference | The reference to the addressable target. |
| System.Int32 | methodId | The method to invoke. |
| System.Object[] | arguments | The method payload. |
| InvokeMethodOptions | options | Invocation options. |
| SiloAddress | silo | The target silo. |
Returns
| Type | Description |
|---|---|
| Task<T> | Returns the response from the remote object. |
Type Parameters
| Name | Description |
|---|---|
| T | The result type |
InvokeOneWayMethod(GrainReference, Int32, Object[], InvokeMethodOptions, SiloAddress)
Invokes a fire and forget method on a remote object.
Declaration
void InvokeOneWayMethod(GrainReference reference, int methodId, object[] arguments, InvokeMethodOptions options, SiloAddress silo)
Parameters
| Type | Name | Description |
|---|---|---|
| GrainReference | reference | The reference to the addressable target. |
| System.Int32 | methodId | The method to invoke. |
| System.Object[] | arguments | The method payload. |
| InvokeMethodOptions | options | Invocation options. |
| SiloAddress | silo | The target silo. |