org.jboss.cache.util.concurrent.locks
Class PerElementReentrantLockContainer<E>
java.lang.Object
org.jboss.cache.util.concurrent.locks.PerElementLockContainer<E>
org.jboss.cache.util.concurrent.locks.PerElementReentrantLockContainer<E>
- All Implemented Interfaces:
- LockContainer<E>
public class PerElementReentrantLockContainer<E>
- extends PerElementLockContainer<E>
Per-element container for ReentrantLock
s
- Since:
- 3.1.0
- Author:
- Manik Surtani
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PerElementReentrantLockContainer
public PerElementReentrantLockContainer(int concurrencyLevel)
ownsLock
public boolean ownsLock(E object,
Object owner)
- Description copied from interface:
LockContainer
- Tests if a give owner owns a lock on a specified object.
- Parameters:
object
- object to checkowner
- owner to test
- Returns:
- true if owner owns lock, false otherwise
isLocked
public boolean isLocked(E object)
- Parameters:
object
- object
- Returns:
- true if an object is locked, false otherwise
newLock
protected final Lock newLock()
- Specified by:
newLock
in class PerElementLockContainer<E>
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.