Show / Hide Table of Contents

Class GrainClient

Client runtime for connecting to Orleans system

Inheritance
System.Object
GrainClient
Namespace: Orleans
Assembly: Orleans.Core.Legacy.dll
Syntax
public static class GrainClient : object

Properties

| Improve this Doc View Source

ClientInvokeCallback

Global pre-call interceptor function Synchronous callback made just before a message is about to be constructed and sent by a client to a grain. This call will be made from the same thread that constructs the message to be sent, so any thread-local settings such as Orleans.RequestContext will be picked up. The action receives an InvokeMethodRequest with details of the method to be invoked, including InterfaceId and MethodId, and a IGrain which is the GrainReference this request is being sent through

Declaration
public static ClientInvokeCallback ClientInvokeCallback { get; set; }
Property Value
Type Description
ClientInvokeCallback
Remarks

This callback method should return promptly and do a minimum of work, to avoid blocking calling thread or impacting throughput.

| Improve this Doc View Source

ConfigureLoggingDelegate

delegate to configure logging, default to none logger configured

Declaration
public static Action<ILoggingBuilder> ConfigureLoggingDelegate { get; set; }
Property Value
Type Description
Action<ILoggingBuilder>
| Improve this Doc View Source

GrainFactory

Declaration
public static IGrainFactory GrainFactory { get; }
Property Value
Type Description
IGrainFactory
| Improve this Doc View Source

Instance

Declaration
public static IClusterClient Instance { get; }
Property Value
Type Description
IClusterClient
| Improve this Doc View Source

IsInitialized

Whether the client runtime has already been initialized

Declaration
public static bool IsInitialized { get; }
Property Value
Type Description
System.Boolean

true if client runtime is already initialized

Methods

| Improve this Doc View Source

GetResponseTimeout()

Get a timeout of responses on this Orleans client.

Declaration
public static TimeSpan GetResponseTimeout()
Returns
Type Description
TimeSpan

The response timeout.

| Improve this Doc View Source

GetStreamProvider(String)

Declaration
public static IStreamProvider GetStreamProvider(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
IStreamProvider
| Improve this Doc View Source

HardKill()

Test hook to uninitialize client without cleanup

Declaration
public static void HardKill()
| Improve this Doc View Source

Initialize()

Initializes the client runtime from the standard client configuration file.

Declaration
public static void Initialize()
| Improve this Doc View Source

Initialize(FileInfo)

Initializes the client runtime from the provided client configuration file. If an error occurs reading the specified configuration file, the initialization fails.

Declaration
public static void Initialize(FileInfo configFile)
Parameters
Type Name Description
FileInfo configFile

The client configuration file.

| Improve this Doc View Source

Initialize(IPEndPoint, Boolean)

Initializes the client runtime from the standard client configuration file using the provided gateway address. Any gateway addresses specified in the config file will be ignored and the provided gateway address wil be used instead.

Declaration
public static void Initialize(IPEndPoint gatewayAddress, bool overrideConfig = true)
Parameters
Type Name Description
IPEndPoint gatewayAddress

IP address and port of the gateway silo

System.Boolean overrideConfig

Whether the specified gateway endpoint should override / replace the values from config file, or be additive

| Improve this Doc View Source

Initialize(ClientConfiguration)

Initializes the client runtime from the provided client configuration object. If the configuration object is null, the initialization fails.

Declaration
public static void Initialize(ClientConfiguration config)
Parameters
Type Name Description
ClientConfiguration config

A ClientConfiguration object.

| Improve this Doc View Source

Initialize(String)

Initializes the client runtime from the provided client configuration file. If an error occurs reading the specified configuration file, the initialization fails.

Declaration
public static void Initialize(string configFilePath)
Parameters
Type Name Description
System.String configFilePath

A relative or absolute pathname for the client configuration file.

| Improve this Doc View Source

SetResponseTimeout(TimeSpan)

Set a timeout for responses on this Orleans client.

Declaration
public static void SetResponseTimeout(TimeSpan timeout)
Parameters
Type Name Description
TimeSpan timeout
| Improve this Doc View Source

Uninitialize()

Uninitializes client runtime.

Declaration
public static void Uninitialize()

Events

| Improve this Doc View Source

ClusterConnectionLost

Declaration
public static event ConnectionToClusterLostHandler ClusterConnectionLost
Event Type
Type Description
ConnectionToClusterLostHandler
  • Improve this Doc
  • View Source
Back to top Generated by DocFX