Package io.ray.api.placementgroup
Interface PlacementGroup
public interface PlacementGroup
A placement group is used to place interdependent actors according to a specific strategy
PlacementStrategy. When a placement group is created, the corresponding actor slots and
resources are preallocated. A placement group consists of one or more bundles plus a specific
placement strategy.-
Method Summary
Modifier and TypeMethodDescriptionGet all bundles which key is resource name and value is resource value.getId()Get the id of current placement group.getName()Get the name of current placement group.getState()Get the state of current placement group.Get the strategy of current placement group.booleanwait(int timeoutSeconds)Wait for the placement group to be ready within the specified time.
-
Method Details
-
getId
PlacementGroupId getId()Get the id of current placement group.- Returns:
- Id of current placement group.
-
getName
String getName()Get the name of current placement group.- Returns:
- Name of current placement group.
-
getBundles
Get all bundles which key is resource name and value is resource value.- Returns:
- All bundles of current placement group.
-
getStrategy
PlacementStrategy getStrategy()Get the strategy of current placement group.- Returns:
- Strategy of current placement group.
-
getState
PlacementGroupState getState()Get the state of current placement group.- Returns:
- Creation state of current placement group.
-
wait
boolean wait(int timeoutSeconds)Wait for the placement group to be ready within the specified time.- Parameters:
timeoutSeconds- Timeout in seconds.- Returns:
- True if the placement group is created. False otherwise.
-