Interface LockStrategy

All Known Implementing Classes:
LockStrategyDefault, LockStrategyNone, LockStrategyWTimeout

public interface LockStrategy
Implement this interface to provide a custom deployment lock strategy. The default lock strategy is LockStrategyDefault.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    acquire(com.espertech.esper.common.internal.util.ManagedReadWriteLock runtimeWideLock)
    Acquire should acquire the write lock of the provided read-write lock and may retry and backoff or fail.
    void
    release(com.espertech.esper.common.internal.util.ManagedReadWriteLock runtimeWideLock)
    Release should release the write lock of the provided read-write lock and should never fail.
  • Method Details

    • acquire

      void acquire(com.espertech.esper.common.internal.util.ManagedReadWriteLock runtimeWideLock) throws LockStrategyException, InterruptedException
      Acquire should acquire the write lock of the provided read-write lock and may retry and backoff or fail.
      Parameters:
      runtimeWideLock - the runtime-wide event processing read-write lock
      Throws:
      LockStrategyException - to indicate lock attempt failed
      InterruptedException - when lock-taking is interrupted
    • release

      void release(com.espertech.esper.common.internal.util.ManagedReadWriteLock runtimeWideLock)
      Release should release the write lock of the provided read-write lock and should never fail.
      Parameters:
      runtimeWideLock - the runtime-wide event processing read-write lock