Package org.nuxeo.runtime.cluster
Interface ClusterService
- All Known Implementing Classes:
ClusterServiceImpl
public interface ClusterService
Cluster Service, defining cluster node state and identity.
- Since:
- 11.1
-
Method Details
-
isEnabled
boolean isEnabled()Checks if cluster mode is enabled.- Returns:
true
if cluster mode is enabled,false
if not
-
getNodeId
Returns the node id. This is nevernull
.- Returns:
- the node id
-
runAtomically
Runs aRunnable
atomically in a cluster-wide critical section, outside a transaction.- Parameters:
key
- the key used to determine atomicityduration
- the duration during which we attempt to acquire the lockpollDelay
- the delay between two subsequent polls of the lockrunnable
- the runnable- Throws:
RuntimeServiceException
- if locking failed
-