Class ContentCachingFilter.LockAndCount
java.lang.Object
net.solarnetwork.central.web.support.ContentCachingFilter.LockAndCount
- All Implemented Interfaces:
Lock
- Enclosing class:
ContentCachingFilter
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() -
lockInterruptibly
- Specified by:
lockInterruptiblyin interfaceLock- Throws:
InterruptedException
-
tryLock
public boolean tryLock() -
tryLock
- Specified by:
tryLockin interfaceLock- Throws:
InterruptedException
-
unlock
public void unlock() -
newCondition
- Specified by:
newConditionin interfaceLock
-