Class ContentCachingFilter.LockAndCount

java.lang.Object
net.solarnetwork.central.web.support.ContentCachingFilter.LockAndCount
All Implemented Interfaces:
Lock
Enclosing class:
ContentCachingFilter

public static class ContentCachingFilter.LockAndCount extends Object implements Lock
A lock with a corresponding counter.
  • Method Details

    • getId

      public int getId()
      Get the identifier.
      Returns:
      the ID
    • count

      public int count()
      Get the count value.
      Returns:
      the count
    • isLocked

      public boolean isLocked()
      Test if the lock is locked (by any thread).
      Returns:
      true if the lock is locked by any thread
    • lock

      public void lock()
      Specified by:
      lock in interface Lock
    • lockInterruptibly

      public void lockInterruptibly() throws InterruptedException
      Specified by:
      lockInterruptibly in interface Lock
      Throws:
      InterruptedException
    • tryLock

      public boolean tryLock()
      Specified by:
      tryLock in interface Lock
    • tryLock

      public boolean tryLock(long time, TimeUnit unit) throws InterruptedException
      Specified by:
      tryLock in interface Lock
      Throws:
      InterruptedException
    • unlock

      public void unlock()
      Specified by:
      unlock in interface Lock
    • newCondition

      public Condition newCondition()
      Specified by:
      newCondition in interface Lock