Interface ClusterService

    • Method Detail

      • isEnabled

        boolean isEnabled()
        Checks if cluster mode is enabled.
        true if cluster mode is enabled, false if not
      • getNodeId

        String getNodeId()
        Returns the node id. This is never null.
        the node id
      • runAtomically

        void runAtomically​(String key,
                           Duration duration,
                           Duration pollDelay,
                           Runnable runnable)
        Runs a Runnable atomically in a cluster-wide critical section, outside a transaction.
        key - the key used to determine atomicity
        duration - the duration during which we attempt to acquire the lock
        pollDelay - the delay between two subsequent polls of the lock
        runnable - the runnable
        RuntimeServiceException - if locking failed