Interface IClusterLockingService


public interface IClusterLockingService
  • Field Details

    • LOCKING_SERVICE_NAME

      static final String LOCKING_SERVICE_NAME
      See Also:
    • LOCK_MAX_WAIT_TIME

      static final int LOCK_MAX_WAIT_TIME
    • LOCK_MAX_TIME

      static final int LOCK_MAX_TIME
    • TASK_LOCK_MAX_WAIT_TIME

      @Deprecated static final int TASK_LOCK_MAX_WAIT_TIME
      Deprecated.
    • TASK_LOCK_MAX_TIME

      @Deprecated static final int TASK_LOCK_MAX_TIME
      Deprecated.
  • Method Details

    • acquireLock

      IClusterLock acquireLock(IURI uri, long validTime, long waitTime) throws PortalException
      Acquires distributed lock for the given thing. Lock is owned by source object. Lock will be valid specified time. If there is an active lock on the given thing this API call may wait for current lock to expire to be released up to specified waitTime.
      Parameters:
      uri - of the thing to be locked
      validTime - time in millis the lock will be valid. 0 - indefinite
      waitTime - waiting time to acquire a lock. 0 - immediately exit if lock can not be obtained)
      Returns:
      acquired lock instance or null if unable to acquire a lock
      Throws:
      PortalException
    • acquireLock

      @Deprecated IClusterLock acquireLock(IURI uri, long validTime, long waitTime, boolean newChange) throws PortalException
      Deprecated.
      Parameters:
      uri -
      validTime -
      waitTime -
      newChange -
      Returns:
      Throws:
      PortalException
    • removeFromTLS

      void removeFromTLS(IClusterLock lock)
      Parameters:
      lock -
    • releaseLock

      void releaseLock(IClusterLock lock) throws PortalException
      Releases previously acquired lock
      Parameters:
      lock - to be released
      Throws:
      PortalException
    • getLock

      IClusterLock getLock(IURI uri) throws PortalException
      Returns instance of any existing lock for the specified thing
      Parameters:
      uri - uri of the thing to return lock for
      Returns:
      active lock instance or null if not does not exist
      Throws:
      PortalException
    • isLightweightLocking

      boolean isLightweightLocking()
      Returns:
      whether lock service uses lightweight locking. Can be safely used only inside single JVM, not across the cluster
    • setLightweightLocking

      void setLightweightLocking(boolean value)
      Sets lightweight locking use. Can be safely used only inside single JVM, not across the cluster
      Parameters:
      value -