Class ClusterServiceImpl.ClusterLockHelper

java.lang.Object
org.nuxeo.runtime.cluster.ClusterServiceImpl.ClusterLockHelper
Enclosing class:
ClusterServiceImpl

public static class ClusterServiceImpl.ClusterLockHelper extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • 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.
    • tryLock

      protected String tryLock(String key)
    • unLock

      protected void unLock(String key, String lockInfo)
    • getLock

      protected String getLock(String key)