public static class ActorCreationOptions.Builder extends Object
| 构造器和说明 |
|---|
Builder() |
| 限定符和类型 | 方法和说明 |
|---|---|
ActorCreationOptions |
build() |
ActorCreationOptions.Builder |
setConcurrencyGroups(List<ConcurrencyGroup> concurrencyGroups)
Set the concurrency groups for this actor.
|
ActorCreationOptions.Builder |
setGlobalName(String name)
Set the name of this actor.
|
ActorCreationOptions.Builder |
setJvmOptions(List<String> jvmOptions)
Set the JVM options for the Java worker that this actor is running in.
|
ActorCreationOptions.Builder |
setJvmOptions(String jvmOptions)
已过时。
Use
setJvmOptions(List) instead. |
ActorCreationOptions.Builder |
setMaxConcurrency(int maxConcurrency)
Set the max number of concurrent calls to allow for this actor.
|
ActorCreationOptions.Builder |
setMaxRestarts(int maxRestarts)
This specifies the maximum number of times that the actor should be restarted when it dies
unexpectedly.
|
ActorCreationOptions.Builder |
setName(String name)
Set the actor name of a named actor.
|
ActorCreationOptions.Builder |
setPlacementGroup(PlacementGroup group,
int bundleIndex)
Set the placement group to place this actor in.
|
ActorCreationOptions.Builder |
setResource(String resourceName,
Double resourceQuantity)
Set a custom resource requirement to reserve for the lifetime of this actor.
|
ActorCreationOptions.Builder |
setResources(Map<String,Double> resources)
Set custom resource requirements to reserve for the lifetime of this actor.
|
public ActorCreationOptions.Builder setName(String name)
Ray.getActor(java.lang.String). If you want create a named actor that
is accessible from all jobs, use setGlobalName(java.lang.String) instead.name - The name of the named actor.public ActorCreationOptions.Builder setGlobalName(String name)
Ray.getGlobalActor(java.lang.String). If you want to create a named actor that is
only accessible from this job, use setName(java.lang.String) instead.name - The name of the named actor.public ActorCreationOptions.Builder setResource(String resourceName, Double resourceQuantity)
resourceName - resource nameresourceQuantity - resource quantitypublic ActorCreationOptions.Builder setResources(Map<String,Double> resources)
resources - requirements for multiple resources.public ActorCreationOptions.Builder setMaxRestarts(int maxRestarts)
maxRestarts - max number of actor restartspublic ActorCreationOptions.Builder setJvmOptions(String jvmOptions)
setJvmOptions(List) instead.Note, if this is set, this actor won't share Java worker with other actors or tasks.
jvmOptions - JVM options for the Java worker that this actor is running in.public ActorCreationOptions.Builder setJvmOptions(List<String> jvmOptions)
Note, if this is set, this actor won't share Java worker with other actors or tasks.
jvmOptions - JVM options for the Java worker that this actor is running in.public ActorCreationOptions.Builder setMaxConcurrency(int maxConcurrency)
The max concurrency defaults to 1 for threaded execution. Note that the execution order is
not guaranteed when max_concurrency > 1.
maxConcurrency - The max number of concurrent calls to allow for this actor.public ActorCreationOptions.Builder setPlacementGroup(PlacementGroup group, int bundleIndex)
group - The placement group of the actor.bundleIndex - The index of the bundle to place this actor in.public ActorCreationOptions build()
public ActorCreationOptions.Builder setConcurrencyGroups(List<ConcurrencyGroup> concurrencyGroups)
Copyright © 2021. All rights reserved.