Class ClusterServiceImpl.ClusterLockHelper

    • Constructor Detail

    • Method Detail

      • runAtomically

        public void runAtomically​(String key,
                                  Runnable runnable)
        Runs a Runnable atomically in a cluster-wide critical section, outside a transaction.
      • runInSeparateTransaction

        protected void runInSeparateTransaction​(Runnable runnable)
        Runs a Runnable outside the current transaction (committing and finally restarting it if needed).
        Implementation Requirements:
        this is different from TransactionHelper.runWithoutTransaction(Runnable) because that one, in some implementations, may keep the current transaction and start the runnable in a new thread. Here we don't want a new thread or a risk of deadlock, so we just commit the original transaction.
      • runAtomicallyInternal

        protected void runAtomicallyInternal​(String key,
                                             Runnable runnable)
        Runs a Runnable atomically, in a cluster-wide critical section.
      • unLock

        protected void unLock​(String key,
                              String lockInfo)