T - The type of the concrete actor creatorpublic class BaseActorCreator<T extends BaseActorCreator> extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected ActorCreationOptions.Builder |
builder |
| 构造器和说明 |
|---|
BaseActorCreator() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected ActorCreationOptions |
buildOptions() |
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 |
setName(String name)
Set the actor name of a named actor.
|
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 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 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)protected ActorCreationOptions buildOptions()
Copyright © 2022. All rights reserved.