Interface ClusterExecutionService

All Known Subinterfaces:
ClusterManager, ClusterManagerInternal
All Known Implementing Classes:
HazelcastClusterManager

@Internal public interface ClusterExecutionService
Since:
9.0
  • Field Details

    • DEFAULT_EXECUTOR_SVC_NAME

      static final String DEFAULT_EXECUTOR_SVC_NAME
      Default name of the executor service to use for executing tasks.
      Since:
      7.14
      See Also:
  • Method Details

    • submitToKeyOwner

      <T> CompletionStage<T> submitToKeyOwner(Callable<T> task, String serviceName, Object key)
      Submit a task to be executed by a service given by its name on one node of the cluster that own a given key.
      Parameters:
      task - task to be executed on the node that owns the provided key, it must be Serializable
      serviceName - name of service used to execute the task
      key - key used to determined which node is going to execute the task, it must be Serializable
      Returns:
      CompletionStage
      Since:
      6.5
    • submitToNode

      <T> ClusterNodeExecution<T> submitToNode(@Nullable String nodeId, Callable<T> task, String serviceName) throws NoSuchClusterNodeException
      Submit a task to be executed on a node with the specified ID
      Parameters:
      nodeId - ID of the node that should execute the task. If null, task will be executed locally.
      task - task to be executed on the specified node
      serviceName - name of service used to execute the task
      Returns:
      node execution result
      Throws:
      NoSuchClusterNodeException - if there's no node in the cluster with the specified ID
      Since:
      7.18
    • submitToAllNodes

      <T> List<ClusterNodeExecution<T>> submitToAllNodes(Callable<T> task, String serviceName)
      Submit a task to be executed on all nodes in the cluster.
      Parameters:
      task - task to be executed on the node that owns the provided key, it must be Serializable
      serviceName - name of service used to execute the task
      Returns:
      List of ClusterNodeExecution, one element from each node
      Since:
      7.14