Class WorkerPoolClientImpl
java.lang.Object
co.yellowdog.platform.clients.scheduler.WorkerPoolClientImpl
- All Implemented Interfaces:
WorkerPoolClient
,AutoCloseable
Implementation of the WorkClient interface.
-
Method Summary
Modifier and TypeMethodDescriptionaddConfiguredWorkerPool
(@NonNull AddConfiguredWorkerPoolRequest request) Submits a NEW configured worker pool to the YellowDog Scheduler service to be initialised.void
addNodeActions
(@NonNull WorkerPool workerPool, NodeAction... actions) Adds the specified node actions to be performed for the specified worker pool.void
addNodeActions
(@NonNull WorkerPool workerPool, NodeActionGroup... actionGroups) Adds the specified groups of node actions to be performed for the specified worker pool.void
addNodeActions
(@NonNull WorkerPool workerPool, List<NodeActionGroup> actionGroups) Adds the specified groups of node actions to be performed for the specified worker pool.void
addNodeActions
(@NonNull WorkerPool workerPool, List<NodeActionGroup> actionGroups, List<String> nodeIdFilterList) Adds the specified groups of node actions to be performed for the specified worker pool.void
addNodeActions
(@NonNull String workerPoolId, NodeAction... actions) Adds the specified node actions to be performed for the specified worker pool.void
addNodeActions
(@NonNull String workerPoolId, NodeActionGroup... actionGroups) Adds the specified groups of node actions to be performed for the specified worker pool.void
addNodeActions
(@NonNull String workerPoolId, @NonNull List<NodeActionGroup> actionGroups) Adds the specified groups of node actions to be performed for the specified worker pool.void
addNodeActions
(@NonNull String workerPoolId, @NonNull List<NodeActionGroup> actionGroups, List<String> nodeIdFilterList) Adds the specified groups of node actions to be performed for the specified worker pool.void
addNodeActionsForNode
(@NonNull Node node, NodeAction... actions) Adds node actions to be performed for the specified node.void
addNodeActionsForNode
(@NonNull String workerPoolId, @NonNull String nodeId, NodeAction... actions) Adds node actions to be performed for the specified node.void
addWorkerPoolListener
(@NonNull WorkerPool workerPool, @NonNull SubscriptionEventListener<WorkerPool> listener) Adds an event listener to receive notifications of changes for the specified worker pool.void
addWorkerPoolListener
(@NonNull String workerPoolId, @NonNull SubscriptionEventListener<WorkerPool> listener) Adds an event listener to receive notifications of changes for the specified worker pool.void
close()
Cancels any active Server-Sent Event subscriptions.static WorkerPoolClientImpl
create
(@NonNull ServicesSchema servicesSchema, @NonNull RetryFactory retryFactory, @NonNull AuthenticationHeadersProvider authenticationHeadersProvider, @NonNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NonNull UserAgent userAgent) Returns summaries of all existing worker pools within the system for the requesting user.findNodes
(@NonNull NodeSearch search) Returns worker pool nodes within the system that match the specified search.findNodes
(@NonNull NodeSearch search, @NonNull SliceReference sliceReference) Returns a slice of nodes that match the specified search and slice reference.getConfiguredWorkerPoolToken
(@NonNull ConfiguredWorkerPool workerPool) Get a configured worker pool token.getConfiguredWorkerPoolToken
(@NonNull String workerPoolId) Get a configured worker pool token.Gets the latest state of the node with the specified ID.Gets the latest state of the node with the specified ID.getNodeActions
(@NonNull Node node) Gets the current state of the specified node's action queue.getNodeActions
(@NonNull String nodeId) Gets the current state of the specified node's action queue.getNodes
(NodeSearch search) Returns aSearchClient
that offers the ability to search nodes.getWorkerPool
(@NonNull String workerPoolId) Gets the latest state of the worker pool with the specified ID.<T extends WorkerPool>
TgetWorkerPool
(@NonNull String workerPoolId, @NonNull Class<T> workerPoolClass) Gets the latest state of the supplied worker pool by ID.getWorkerPool
(@NonNull String namespace, @NonNull String name) Gets the latest state of the worker pool with the specified namespace and name.<T extends WorkerPool>
TgetWorkerPool
(@NonNull String namespace, @NonNull String name, @NonNull Class<T> workerPoolClass) Gets the latest state of the supplied worker pool by namespace and name.<T extends WorkerPool>
TgetWorkerPool
(T workerPool) Gets the latest state of the supplied worker pool.getWorkerPoolHelper
(@NonNull WorkerPool workerPool) Constructs a new worker pool helper for the specified worker pool.getWorkerPoolHelper
(@NonNull String workerPoolId) Constructs a new worker pool helper for the specified worker pool.getWorkerPools
(WorkerPoolSearch search) Returns aSearchClient
that offers the ability to search worker pools.provisionWorkerPool
(@NonNull ComputeRequirementTemplateUsage computeRequirementTemplateUsage) Requests that the supplied compute requirement template request is used to provision a worker pool.provisionWorkerPool
(@NonNull ComputeRequirementTemplateUsage computeRequirementTemplateUsage, ProvisionedWorkerPoolProperties provisionedProperties) Requests that the supplied compute requirement template request is used to provision a worker pool.refreshConfiguredWorkerPoolToken
(@NonNull ConfiguredWorkerPool workerPool) Refresh a configured worker pool token with an unlimited time-to-live.refreshConfiguredWorkerPoolToken
(@NonNull ConfiguredWorkerPool workerPool, Duration tokenTtl) Refresh a configured worker pool token with the specified time-to-live.refreshConfiguredWorkerPoolToken
(@NonNull String workerPoolId) Refresh a configured worker pool token with an unlimited time-to-live.refreshConfiguredWorkerPoolToken
(@NonNull String workerPoolId, Duration tokenTtl) Refresh a configured worker pool token with the specified time-to-live.regenerateConfiguredWorkerPoolToken
(@NonNull ConfiguredWorkerPool workerPool) Regenerate a configured worker pool token with an unlimited time-to-live.regenerateConfiguredWorkerPoolToken
(@NonNull ConfiguredWorkerPool workerPool, Duration tokenTtl) Regenerate a configured worker pool token with the specified time-to-live.regenerateConfiguredWorkerPoolToken
(@NonNull String workerPoolId) Regenerate a configured worker pool token with an unlimited time-to-live.regenerateConfiguredWorkerPoolToken
(@NonNull String workerPoolId, Duration tokenTtl) Regenerate a configured worker pool token with the specified time-to-live.void
removeWorkerPoolListener
(@NonNull SubscriptionEventListener<WorkerPool> listener) Removes the specified event listener.resizeWorkerPool
(@NonNull ProvisionedWorkerPool workerPool, int size) Resizes the specified worker pool to the given number of nodes.resizeWorkerPool
(@NonNull String workerPoolId, int size) Resizes the specified worker pool to the given number of nodes.shutdownNode
(@NonNull Node node) Shuts down the specified node gracefully, allowing any running tasks to finish first.shutdownNode
(@NonNull String nodeId) Shuts down the specified node gracefully, allowing any running tasks to finish first.void
shutdownWorkerPool
(@NonNull WorkerPool workerPool) Shuts down the specified worker pool.void
shutdownWorkerPool
(@NonNull String workerPoolId) Shuts down the specified worker pool.streamNodes
(@NonNull NodeSearch search) Streams nodes within the system that match the specified search.
-
Method Details
-
create
public static WorkerPoolClientImpl create(@NonNull @NonNull ServicesSchema servicesSchema, @NonNull @NonNull RetryFactory retryFactory, @NonNull @NonNull AuthenticationHeadersProvider authenticationHeadersProvider, @NonNull @NonNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NonNull @NonNull UserAgent userAgent) -
addConfiguredWorkerPool
public AddConfiguredWorkerPoolResponse addConfiguredWorkerPool(@NonNull @NonNull AddConfiguredWorkerPoolRequest request) Description copied from interface:WorkerPoolClient
Submits a NEW configured worker pool to the YellowDog Scheduler service to be initialised.- Specified by:
addConfiguredWorkerPool
in interfaceWorkerPoolClient
- Parameters:
request
- the request containing details of the worker pool- Returns:
- the response containing the worker pool and the token
-
refreshConfiguredWorkerPoolToken
public WorkerPoolToken refreshConfiguredWorkerPoolToken(@NonNull @NonNull ConfiguredWorkerPool workerPool) Description copied from interface:WorkerPoolClient
Refresh a configured worker pool token with an unlimited time-to-live.- Specified by:
refreshConfiguredWorkerPoolToken
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker pool- Returns:
- the worker pool token
-
refreshConfiguredWorkerPoolToken
public WorkerPoolToken refreshConfiguredWorkerPoolToken(@NonNull @NonNull ConfiguredWorkerPool workerPool, Duration tokenTtl) Description copied from interface:WorkerPoolClient
Refresh a configured worker pool token with the specified time-to-live.- Specified by:
refreshConfiguredWorkerPoolToken
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker pooltokenTtl
- the token time-to-live.- Returns:
- the worker pool token
-
refreshConfiguredWorkerPoolToken
Description copied from interface:WorkerPoolClient
Refresh a configured worker pool token with an unlimited time-to-live.- Specified by:
refreshConfiguredWorkerPoolToken
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the worker pool ID- Returns:
- the worker pool token
-
refreshConfiguredWorkerPoolToken
public WorkerPoolToken refreshConfiguredWorkerPoolToken(@NonNull @NonNull String workerPoolId, Duration tokenTtl) Description copied from interface:WorkerPoolClient
Refresh a configured worker pool token with the specified time-to-live.- Specified by:
refreshConfiguredWorkerPoolToken
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the worker pool IDtokenTtl
- the token time-to-live.- Returns:
- the worker pool token
-
regenerateConfiguredWorkerPoolToken
public WorkerPoolToken regenerateConfiguredWorkerPoolToken(@NonNull @NonNull ConfiguredWorkerPool workerPool) Description copied from interface:WorkerPoolClient
Regenerate a configured worker pool token with an unlimited time-to-live.- Specified by:
regenerateConfiguredWorkerPoolToken
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker pool- Returns:
- the worker pool token
-
regenerateConfiguredWorkerPoolToken
public WorkerPoolToken regenerateConfiguredWorkerPoolToken(@NonNull @NonNull ConfiguredWorkerPool workerPool, Duration tokenTtl) Description copied from interface:WorkerPoolClient
Regenerate a configured worker pool token with the specified time-to-live.- Specified by:
regenerateConfiguredWorkerPoolToken
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker pooltokenTtl
- the token time-to-live.- Returns:
- the worker pool token
-
regenerateConfiguredWorkerPoolToken
Description copied from interface:WorkerPoolClient
Regenerate a configured worker pool token with an unlimited time-to-live.- Specified by:
regenerateConfiguredWorkerPoolToken
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the worker pool ID- Returns:
- the worker pool token
-
regenerateConfiguredWorkerPoolToken
public WorkerPoolToken regenerateConfiguredWorkerPoolToken(@NonNull @NonNull String workerPoolId, Duration tokenTtl) Description copied from interface:WorkerPoolClient
Regenerate a configured worker pool token with the specified time-to-live.- Specified by:
regenerateConfiguredWorkerPoolToken
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the worker pool IDtokenTtl
- the token time-to-live.- Returns:
- the worker pool token
-
getConfiguredWorkerPoolToken
public WorkerPoolToken getConfiguredWorkerPoolToken(@NonNull @NonNull ConfiguredWorkerPool workerPool) Description copied from interface:WorkerPoolClient
Get a configured worker pool token.- Specified by:
getConfiguredWorkerPoolToken
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker pool- Returns:
- the worker pool token
-
getConfiguredWorkerPoolToken
Description copied from interface:WorkerPoolClient
Get a configured worker pool token.- Specified by:
getConfiguredWorkerPoolToken
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the worker pool ID- Returns:
- the worker pool token
-
provisionWorkerPool
public ProvisionedWorkerPool provisionWorkerPool(@NonNull @NonNull ComputeRequirementTemplateUsage computeRequirementTemplateUsage) Description copied from interface:WorkerPoolClient
Requests that the supplied compute requirement template request is used to provision a worker pool.- Specified by:
provisionWorkerPool
in interfaceWorkerPoolClient
- Parameters:
computeRequirementTemplateUsage
- the compute requirement template usage from which to provision a worker pool- Returns:
- the provisioned worker pool
-
provisionWorkerPool
public ProvisionedWorkerPool provisionWorkerPool(@NonNull @NonNull ComputeRequirementTemplateUsage computeRequirementTemplateUsage, ProvisionedWorkerPoolProperties provisionedProperties) Description copied from interface:WorkerPoolClient
Requests that the supplied compute requirement template request is used to provision a worker pool.- Specified by:
provisionWorkerPool
in interfaceWorkerPoolClient
- Parameters:
computeRequirementTemplateUsage
- the compute requirement template usage from which to provision a worker poolprovisionedProperties
- the properties used to determine behaviour when managing the worker pool- Returns:
- the provisioned worker pool
-
resizeWorkerPool
public ProvisionedWorkerPool resizeWorkerPool(@NonNull @NonNull ProvisionedWorkerPool workerPool, int size) Description copied from interface:WorkerPoolClient
Resizes the specified worker pool to the given number of nodes.- Specified by:
resizeWorkerPool
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker pool to resizesize
- the target number of nodes when resizing the worker pool- Returns:
- the latest state of the worker pool
-
resizeWorkerPool
Description copied from interface:WorkerPoolClient
Resizes the specified worker pool to the given number of nodes.- Specified by:
resizeWorkerPool
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the ID of the worker pool to resizesize
- the target number of nodes when resizing the worker pool- Returns:
- the latest state of the worker pool
-
shutdownWorkerPool
Description copied from interface:WorkerPoolClient
Shuts down the specified worker pool.- Specified by:
shutdownWorkerPool
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker pool to shutdown
-
shutdownWorkerPool
Description copied from interface:WorkerPoolClient
Shuts down the specified worker pool.- Specified by:
shutdownWorkerPool
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the ID of the worker pool to shutdown
-
getWorkerPool
Description copied from interface:WorkerPoolClient
Gets the latest state of the supplied worker pool.- Specified by:
getWorkerPool
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker pool for which to get the latest state- Returns:
- the latest state of the worker pool
-
getWorkerPool
Description copied from interface:WorkerPoolClient
Gets the latest state of the worker pool with the specified ID.- Specified by:
getWorkerPool
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the ID of the worker pool- Returns:
- the latest state of the worker pool
-
getWorkerPool
Description copied from interface:WorkerPoolClient
Gets the latest state of the worker pool with the specified namespace and name.- Specified by:
getWorkerPool
in interfaceWorkerPoolClient
- Parameters:
namespace
- the namespace of the worker poolname
- the name of the worker pool- Returns:
- the latest state of the worker pool
-
getWorkerPool
public <T extends WorkerPool> T getWorkerPool(@NonNull @NonNull String workerPoolId, @NonNull @NonNull Class<T> workerPoolClass) Description copied from interface:WorkerPoolClient
Gets the latest state of the supplied worker pool by ID.- Specified by:
getWorkerPool
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the ID of the worker poolworkerPoolClass
- the type of the worker pool to return- Returns:
- the latest state of the worker pool
-
getWorkerPool
public <T extends WorkerPool> T getWorkerPool(@NonNull @NonNull String namespace, @NonNull @NonNull String name, @NonNull @NonNull Class<T> workerPoolClass) Description copied from interface:WorkerPoolClient
Gets the latest state of the supplied worker pool by namespace and name.- Specified by:
getWorkerPool
in interfaceWorkerPoolClient
- Parameters:
namespace
- the namespace of the worker poolname
- the name of the worker poolworkerPoolClass
- the type of the worker pool to return- Returns:
- the latest state of the worker pool
-
addWorkerPoolListener
public void addWorkerPoolListener(@NonNull @NonNull WorkerPool workerPool, @NonNull @NonNull SubscriptionEventListener<WorkerPool> listener) Description copied from interface:WorkerPoolClient
Adds an event listener to receive notifications of changes for the specified worker pool. The client manages subscriptions to YellowDog Scheduler such that the first listener created for a worker pool will cause a Server-Sent Events subscription to be initiated; additional listeners for the same worker pool share that subscription.- Specified by:
addWorkerPoolListener
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker pool for which to receive notificationslistener
- the event listener that will be invoked for notifications
-
addWorkerPoolListener
public void addWorkerPoolListener(@NonNull @NonNull String workerPoolId, @NonNull @NonNull SubscriptionEventListener<WorkerPool> listener) Description copied from interface:WorkerPoolClient
Adds an event listener to receive notifications of changes for the specified worker pool. The client manages subscriptions to YellowDog Scheduler such that the first listener created for a worker pool will cause a Server-Sent Events subscription to be initiated; additional listeners for the same worker pool share that subscription.- Specified by:
addWorkerPoolListener
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the ID of the worker pool for which to receive notificationslistener
- the event listener that will be invoked for notifications
-
removeWorkerPoolListener
public void removeWorkerPoolListener(@NonNull @NonNull SubscriptionEventListener<WorkerPool> listener) Description copied from interface:WorkerPoolClient
Removes the specified event listener. The client manages subscriptions to YellowDog Scheduler such that when the last listener for a worker pool is removed, the associated Server-Sent Events subscription is cancelled.- Specified by:
removeWorkerPoolListener
in interfaceWorkerPoolClient
- Parameters:
listener
- the event listener that will no longer be invoked for notifications
-
getWorkerPoolHelper
Description copied from interface:WorkerPoolClient
Constructs a new worker pool helper for the specified worker pool.- Specified by:
getWorkerPoolHelper
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker pool for which the helper will be constructed- Returns:
- a new worker pool helper
-
getWorkerPoolHelper
Description copied from interface:WorkerPoolClient
Constructs a new worker pool helper for the specified worker pool.- Specified by:
getWorkerPoolHelper
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the ID of the worker pool for which the helper will be constructed- Returns:
- a new worker pool helper
-
findAllWorkerPools
Description copied from interface:WorkerPoolClient
Returns summaries of all existing worker pools within the system for the requesting user.- Specified by:
findAllWorkerPools
in interfaceWorkerPoolClient
- Returns:
- a list of worker pool summaries
-
getWorkerPools
Description copied from interface:WorkerPoolClient
Returns aSearchClient
that offers the ability to search worker pools.- Specified by:
getWorkerPools
in interfaceWorkerPoolClient
- Parameters:
search
- the search- Returns:
- the search client
-
findNodes
Description copied from interface:WorkerPoolClient
Returns worker pool nodes within the system that match the specified search. WARNING: If your search matches too many workers to fit into your application's memory limits, consider usingWorkerPoolClient.streamNodes(NodeSearch)
orWorkerPoolClient.findNodes(NodeSearch, SliceReference)
.- Specified by:
findNodes
in interfaceWorkerPoolClient
- Parameters:
search
- the search- Returns:
- a list of nodes
-
findNodes
public Slice<Node> findNodes(@NonNull @NonNull NodeSearch search, @NonNull @NonNull SliceReference sliceReference) Description copied from interface:WorkerPoolClient
Returns a slice of nodes that match the specified search and slice reference.- Specified by:
findNodes
in interfaceWorkerPoolClient
- Parameters:
search
- the searchsliceReference
- the slice reference- Returns:
- a slice of nodes
-
streamNodes
Description copied from interface:WorkerPoolClient
Streams nodes within the system that match the specified search.- Specified by:
streamNodes
in interfaceWorkerPoolClient
- Parameters:
search
- the search- Returns:
- a stream of nodes
-
getNode
Description copied from interface:WorkerPoolClient
Gets the latest state of the node with the specified ID.- Specified by:
getNode
in interfaceWorkerPoolClient
- Parameters:
node
- the node- Returns:
- the latest state of the node
-
getNode
Description copied from interface:WorkerPoolClient
Gets the latest state of the node with the specified ID.- Specified by:
getNode
in interfaceWorkerPoolClient
- Parameters:
nodeId
- the ID of the node- Returns:
- the latest state of the node
-
shutdownNode
Description copied from interface:WorkerPoolClient
Shuts down the specified node gracefully, allowing any running tasks to finish first.- Specified by:
shutdownNode
in interfaceWorkerPoolClient
- Parameters:
node
- the node- Returns:
- the latest state of the node
-
shutdownNode
Description copied from interface:WorkerPoolClient
Shuts down the specified node gracefully, allowing any running tasks to finish first.- Specified by:
shutdownNode
in interfaceWorkerPoolClient
- Parameters:
nodeId
- the ID of the node- Returns:
- the latest state of the node
-
addNodeActionsForNode
Description copied from interface:WorkerPoolClient
Adds node actions to be performed for the specified node. Sets the nodeIdFilter and nodeTypes properties of any actions to apply to the specified node.- Specified by:
addNodeActionsForNode
in interfaceWorkerPoolClient
- Parameters:
node
- the nodeactions
- the node actions
-
addNodeActionsForNode
public void addNodeActionsForNode(@NonNull @NonNull String workerPoolId, @NonNull @NonNull String nodeId, NodeAction... actions) Description copied from interface:WorkerPoolClient
Adds node actions to be performed for the specified node. Sets the nodeIdFilter and nodeTypes properties of any actions to apply to the specified node.- Specified by:
addNodeActionsForNode
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the ID of the worker pool containing the nodenodeId
- the ID of the nodeactions
- the node actions
-
addNodeActions
Description copied from interface:WorkerPoolClient
Adds the specified node actions to be performed for the specified worker pool.- Specified by:
addNodeActions
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the ID of the worker poolactions
- the node actions
-
addNodeActions
Description copied from interface:WorkerPoolClient
Adds the specified groups of node actions to be performed for the specified worker pool.- Specified by:
addNodeActions
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the ID of the worker poolactionGroups
- the node action groups
-
addNodeActions
public void addNodeActions(@NonNull @NonNull String workerPoolId, @NonNull @NonNull List<NodeActionGroup> actionGroups) Description copied from interface:WorkerPoolClient
Adds the specified groups of node actions to be performed for the specified worker pool.- Specified by:
addNodeActions
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the ID of the worker poolactionGroups
- the node action groups
-
addNodeActions
public void addNodeActions(@NonNull @NonNull String workerPoolId, @NonNull @NonNull List<NodeActionGroup> actionGroups, List<String> nodeIdFilterList) Description copied from interface:WorkerPoolClient
Adds the specified groups of node actions to be performed for the specified worker pool.- Specified by:
addNodeActions
in interfaceWorkerPoolClient
- Parameters:
workerPoolId
- the ID of the worker poolactionGroups
- the node action groupsnodeIdFilterList
- a list of node IDs that can be used to filter recipients of node actions
-
addNodeActions
Description copied from interface:WorkerPoolClient
Adds the specified node actions to be performed for the specified worker pool.- Specified by:
addNodeActions
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker poolactions
- the node actions
-
addNodeActions
public void addNodeActions(@NonNull @NonNull WorkerPool workerPool, NodeActionGroup... actionGroups) Description copied from interface:WorkerPoolClient
Adds the specified groups of node actions to be performed for the specified worker pool.- Specified by:
addNodeActions
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker poolactionGroups
- the node action groups
-
addNodeActions
public void addNodeActions(@NonNull @NonNull WorkerPool workerPool, List<NodeActionGroup> actionGroups) Description copied from interface:WorkerPoolClient
Adds the specified groups of node actions to be performed for the specified worker pool.- Specified by:
addNodeActions
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker poolactionGroups
- the node action groups
-
addNodeActions
public void addNodeActions(@NonNull @NonNull WorkerPool workerPool, List<NodeActionGroup> actionGroups, List<String> nodeIdFilterList) Description copied from interface:WorkerPoolClient
Adds the specified groups of node actions to be performed for the specified worker pool.- Specified by:
addNodeActions
in interfaceWorkerPoolClient
- Parameters:
workerPool
- the worker poolactionGroups
- the node action groupsnodeIdFilterList
- a list of node IDs that can be used to filter recipients of node actions
-
getNodeActions
Description copied from interface:WorkerPoolClient
Gets the current state of the specified node's action queue.- Specified by:
getNodeActions
in interfaceWorkerPoolClient
- Parameters:
node
- the node- Returns:
- the current state of the action queue
-
getNodeActions
Description copied from interface:WorkerPoolClient
Gets the current state of the specified node's action queue.- Specified by:
getNodeActions
in interfaceWorkerPoolClient
- Parameters:
nodeId
- the ID of the node- Returns:
- the current state of the action queue
-
getNodes
Description copied from interface:WorkerPoolClient
Returns aSearchClient
that offers the ability to search nodes.- Specified by:
getNodes
in interfaceWorkerPoolClient
- Parameters:
search
- the search- Returns:
- the search client
-
close
public void close()Cancels any active Server-Sent Event subscriptions.- Specified by:
close
in interfaceAutoCloseable
-