Class NoOpLock

java.lang.Object
org.axonframework.common.lock.NoOpLock
All Implemented Interfaces:
AutoCloseable, Lock

public class NoOpLock extends Object implements Lock
No-op implementation of a Lock. Does nothing on release() and returns true for isHeld().
Since:
4.5.11
Author:
Steven van Beelen
  • Field Details

    • INSTANCE

      public static final Lock INSTANCE
  • Method Details

    • release

      public void release()
      Description copied from interface: Lock
      Releases this lock. If this lock is already released or no longer valid, the behavior of this method is undefined.
      Specified by:
      release in interface Lock
    • isHeld

      public boolean isHeld()
      Description copied from interface: Lock
      Indicates whether the lock is still owned true, or whether it has been released false.
      Specified by:
      isHeld in interface Lock
      Returns:
      true if the lock is still valid, or false if it has been released