ActorRuntime.RegisterActorAsync Method

Definition

Overloads

RegisterActorAsync<TActor>(TimeSpan, CancellationToken)

Registers an actor type with Service Fabric runtime. This allows the runtime to create instances of this actor.

RegisterActorAsync<TActor>(Func<StatefulServiceContext,ActorTypeInformation,ActorService>, TimeSpan, CancellationToken)

Registers an actor service with Service Fabric runtime. This allows the runtime to create instances of the replicas for the actor service.

RegisterActorAsync<TActor>(TimeSpan, CancellationToken)

Registers an actor type with Service Fabric runtime. This allows the runtime to create instances of this actor.

public static System.Threading.Tasks.Task RegisterActorAsync<TActor> (TimeSpan timeout = null, System.Threading.CancellationToken cancellationToken = null) where TActor : Microsoft.ServiceFabric.Actors.Runtime.ActorBase;
static member RegisterActorAsync : TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task (requires 'Actor :> Microsoft.ServiceFabric.Actors.Runtime.ActorBase)

Type Parameters

TActor

The type implementing the actor.

Parameters

timeout
System.TimeSpan

A timeout period after which the registration operation will be canceled.

cancellationToken
System.Threading.CancellationToken

The token to monitor for cancellation requests.

Returns

System.Threading.Tasks.Task

returns a task that represents the asynchronous operation to register actor type with Service Fabric runtime.

Applies to

RegisterActorAsync<TActor>(Func<StatefulServiceContext,ActorTypeInformation,ActorService>, TimeSpan, CancellationToken)

Registers an actor service with Service Fabric runtime. This allows the runtime to create instances of the replicas for the actor service.

public static System.Threading.Tasks.Task RegisterActorAsync<TActor> (Func<System.Fabric.StatefulServiceContext,Microsoft.ServiceFabric.Actors.Runtime.ActorTypeInformation,Microsoft.ServiceFabric.Actors.Runtime.ActorService> actorServiceFactory, TimeSpan timeout = null, System.Threading.CancellationToken cancellationToken = null) where TActor : Microsoft.ServiceFabric.Actors.Runtime.ActorBase;
static member RegisterActorAsync : Func<System.Fabric.StatefulServiceContext, Microsoft.ServiceFabric.Actors.Runtime.ActorTypeInformation, Microsoft.ServiceFabric.Actors.Runtime.ActorService> * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task (requires 'Actor :> Microsoft.ServiceFabric.Actors.Runtime.ActorBase)

Type Parameters

TActor

The Type implementing actor.

Parameters

actorServiceFactory
System.Func<StatefulServiceContext,ActorTypeInformation,ActorService>

The delegate that creates new actor service.

timeout
System.TimeSpan

A timeout period after which the registration operation will be canceled.

cancellationToken
System.Threading.CancellationToken

The token to monitor for cancellation requests.

Returns

System.Threading.Tasks.Task

A task that repre sents the asynchronous operation to register actor service with Service Fabric runtime.

Applies to