Class ImportMutex

java.lang.Object
com.atlassian.confluence.importexport.ImportMutex

@Deprecated public class ImportMutex extends Object
Deprecated.
since 7.17.0.
A very simple locking mutex that is designed to prevent two import tasks from running at the same time.
Since:
5.6
  • Field Details

    • INSTANCE

      public static final ImportMutex INSTANCE
      Deprecated.
  • Method Details

    • lockMutex

      public void lockMutex(Object client)
      Deprecated.
      Obtain the lock on the mutex.
      Parameters:
      client - The object that wants to "own" the mutex. Typically is the calling object.
      Throws:
      IllegalStateException - if the mutex is currently held by the same or another object.
    • unlockMutex

      public void unlockMutex(Object client)
      Deprecated.
      Releases the lock
      Parameters:
      client - the object that currently "owns" the mutex. Must be the same object that was previously passed to lockMutex(Object)
      Throws:
      IllegalStateException - if the mutex is not currently held by the given object.
    • isLocked

      public boolean isLocked()
      Deprecated.
      Queries the current state of the mutex
      Returns:
      true if the mutex is currently held, false otherwise.