T - The type of the concrete actor creatorpublic class BaseActorCreator<T extends BaseActorCreator> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ActorCreationOptions.Builder |
builder |
| Constructor and Description |
|---|
BaseActorCreator() |
| Modifier and Type | Method and Description |
|---|---|
protected ActorCreationOptions |
buildOptions() |
T |
setLifetime(ActorLifetime lifetime) |
T |
setMaxConcurrency(int maxConcurrency)
Set the max number of concurrent calls to allow for this actor.
|
T |
setMaxPendingCalls(int maxPendingCalls)
Set the max number of pending calls allowed on the actor handle.
|
T |
setMaxRestarts(int maxRestarts)
This specifies the maximum number of times that the actor should be restarted when it dies
unexpectedly.
|
T |
setMaxTaskRetries(int maxTaskRetries)
This specifies the maximum number of times that an actor task can be retried.
|
T |
setName(String name)
Set the actor name of a named actor.
|
T |
setName(String name,
String namespace)
Set the actor name along with a different namespace.
|
T |
setPlacementGroup(PlacementGroup group)
Set the placement group to place this actor in, which may use any available bundle.
|
T |
setPlacementGroup(PlacementGroup group,
int bundleIndex)
Set the placement group to place this actor in.
|
T |
setResource(String resourceName,
Double resourceQuantity)
Set a custom resource requirement to reserve for the lifetime of this actor.
|
T |
setResources(Map<String,Double> resources)
Set custom resource requirements to reserve for the lifetime of this actor.
|
protected ActorCreationOptions.Builder builder
public T setName(String name)
name - The name of the named actor.ActorCreationOptions.Builder.setName(String)public T setName(String name, String namespace)
name - The name of the named actor.namespace - The namespace that this actor will live in.public T setLifetime(ActorLifetime lifetime)
public T setResource(String resourceName, Double resourceQuantity)
resourceName - resource nameresourceQuantity - resource quantityActorCreationOptions.Builder#setResource(java.lang.String, java.lang.Double)public T setResources(Map<String,Double> resources)
resources - requirements for multiple resources.setResources(java.util.Map)public T setMaxRestarts(int maxRestarts)
maxRestarts - max number of actor restartsActorCreationOptions.Builder#setMaxRestarts(int)public T setMaxTaskRetries(int maxTaskRetries)
maxTaskRetries - max number of actor task retriesActorCreationOptions.Builder#setMaxTaskRetries(int)public T setMaxConcurrency(int maxConcurrency)
The maximum concurrency defaults to 1 for threaded execution. Note that the execution order
is not guaranteed when max_concurrency > 1.
maxConcurrency - The maximum number of concurrent calls to allow for this actor.ActorCreationOptions.Builder#setMaxConcurrency(int)public T setMaxPendingCalls(int maxPendingCalls)
maxPendingCalls - The maximum number of pending calls for this actor.public T setPlacementGroup(PlacementGroup group, int bundleIndex)
group - The placement group of the actor.bundleIndex - The index of the bundle to place this actor in.ActorCreationOptions.Builder#setPlacementGroup(PlacementGroup, int)public T setPlacementGroup(PlacementGroup group)
group - The placement group of the actor.ActorCreationOptions.Builder#setPlacementGroup(PlacementGroup, int)protected ActorCreationOptions buildOptions()
Copyright © 2024. All rights reserved.