Interface ClusterService

    • Method Detail

      • isEnabled

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

        @NotNull
        String getNodeId()
        Returns the node id. This is never null.
        Returns:
        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.
        Parameters:
        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
        Throws:
        RuntimeServiceException - if locking failed