org.infinispan.util.concurrent.locks
Class OwnableRefCountingReentrantLock
java.lang.Object
java.util.concurrent.locks.AbstractOwnableSynchronizer
java.util.concurrent.locks.AbstractQueuedSynchronizer
org.infinispan.util.concurrent.locks.OwnableReentrantLock
org.infinispan.util.concurrent.locks.OwnableRefCountingReentrantLock
- All Implemented Interfaces:
- Serializable, Lock, RefCountingLock
public class OwnableRefCountingReentrantLock
- extends OwnableReentrantLock
- implements RefCountingLock
A version of OwnableReentrantLock
that has a reference counter, and implements RefCountingLock
.
Used with a lock-per-entry container, in this case the OwnableReentrantPerEntryLockContainer
.
- Since:
- 5.2
- Author:
- Manik Surtani
- See Also:
OwnableReentrantPerEntryLockContainer
,
Serialized Form
Methods inherited from class org.infinispan.util.concurrent.locks.OwnableReentrantLock |
currentRequestor, getHoldCount, getOwner, isHeldExclusively, isLocked, lock, lock, lockInterruptibly, newCondition, tryAcquire, tryLock, tryLock, tryLock, tryRelease, unlock, unlock, unsetCurrentRequestor |
Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer |
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedThreads, hasWaiters, isQueued, owns, release, releaseShared, setState, tryAcquireNanos, tryAcquireShared, tryAcquireSharedNanos, tryReleaseShared |
OwnableRefCountingReentrantLock
public OwnableRefCountingReentrantLock()
getReferenceCounter
public AtomicInteger getReferenceCounter()
- Description copied from interface:
RefCountingLock
- Accesses the reference counter for this lock
- Specified by:
getReferenceCounter
in interface RefCountingLock
- Returns:
- a reference counter
toString
public String toString()
- Description copied from class:
OwnableReentrantLock
- Returns a string identifying this lock, as well as its lock state. The state, in brackets, includes either the
String "Unlocked" or the String "Locked by" followed by the String representation of the lock
owner.
- Overrides:
toString
in class OwnableReentrantLock
- Returns:
- a string identifying this lock, as well as its lock state.
Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.