Package org.kie.api.cluster
Interface ClusterAwareService
-
- All Superinterfaces:
java.lang.Comparable<KieService>
,KieService
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 java.lang.String
CLUSTER_JOBS_KEY
static java.lang.String
CLUSTER_NODES_KEY
-
Fields inherited from interface org.kie.api.internal.utils.KieService
UNDEFINED
-
-
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(java.lang.String key, java.lang.String partition, T value)
java.util.Collection<ClusterNode>
getActiveClusterNodes()
Get all active members of the cluster<T> java.util.List<T>
getData(java.lang.String key)
<T> java.util.List<T>
getDataFromPartition(java.lang.String key, java.lang.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(java.lang.String key, java.lang.String partition, T value)
-
Methods inherited from interface org.kie.api.internal.utils.KieService
compareTo, servicePriority, serviceTag
-
-
-
-
Field Detail
-
CLUSTER_NODES_KEY
static final java.lang.String CLUSTER_NODES_KEY
- See Also:
- Constant Field Values
-
CLUSTER_JOBS_KEY
static final java.lang.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
java.util.Collection<ClusterNode> getActiveClusterNodes()
Get all active members of the cluster
-
removeData
<T> void removeData(java.lang.String key, java.lang.String partition, T value)
-
addData
<T> void addData(java.lang.String key, java.lang.String partition, T value)
-
getData
<T> java.util.List<T> getData(java.lang.String key)
-
getDataFromPartition
<T> java.util.List<T> getDataFromPartition(java.lang.String key, java.lang.String partition)
-
addClusterListener
void addClusterListener(ClusterListener listener)
Add cluster listener for join and left members- Parameters:
listener
-
-
-