Package org.kie.api.cluster

## Interface ClusterAwareService

- All Superinterfaces:
    `KieService`, `Service`

      public interface ClusterAwareService
      extends KieService

  Interface that allows to rise some awareness about the cluster environment

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `CLUSTER_JOBS_KEY` |
    `static String` | `CLUSTER_NODES_KEY` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addClusterListener​(ClusterListener listener)` | Add cluster listener for join and left members
    `<T> void` | `addData​(String key, String partition, T value)` |
    `Collection<ClusterNode>` | `getActiveClusterNodes()` | Get all active members of the cluster
    `<T> List<T>` | `getData​(String key)` |
    `<T> List<T>` | `getDataFromPartition​(String key, String partition)` |
    `ClusterNode` | `getThisNode()` |
    `boolean` | `isCoordinator()` | Computes whether the jbpm engine instance is the coordinator therefore the one to provide singleton cluster active features.
    `<T> void` | `removeData​(String key, String partition, T value)` |

- - ### Field Detail

    - #### CLUSTER_NODES_KEY

          static final String CLUSTER_NODES_KEY

      See Also:
        Constant Field Values

    - #### CLUSTER_JOBS_KEY

          static final String CLUSTER_JOBS_KEY

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getThisNode

          ClusterNode getThisNode()

    - #### isCoordinator

          boolean isCoordinator()

      Computes whether the jbpm engine instance is the coordinator therefore the one to provide singleton cluster active features.
      Returns:
        whether this instance of jbpm engine is the one coordinating or not.

    - #### getActiveClusterNodes

          Collection<ClusterNode> getActiveClusterNodes()

      Get all active members of the cluster

    - #### removeData

          <T> void removeData​(String key,
                              String partition,
                              T value)

    - #### addData

          <T> void addData​(String key,
                           String partition,
                           T value)

    - #### getData

          <T> List<T> getData​(String key)

    - #### getDataFromPartition

          <T> List<T> getDataFromPartition​(String key,
                                           String partition)

    - #### addClusterListener

          void addClusterListener​(ClusterListener listener)

      Add cluster listener for join and left members
      Parameters:
        `listener` -