public class ReentrantPerEntryLockContainer extends AbstractPerEntryLockContainer<ReentrantLock>
locks
Constructor and Description |
---|
ReentrantPerEntryLockContainer(int concurrencyLevel) |
Modifier and Type | Method and Description |
---|---|
boolean |
isLocked(Object key) |
protected ReentrantLock |
newLock() |
boolean |
ownsLock(Object key,
Object ignored)
Tests if a give owner owns a lock on a specified object.
|
protected boolean |
tryLock(ReentrantLock lock,
long timeout,
TimeUnit unit,
Object unused) |
protected void |
unlock(ReentrantLock l,
Object unused) |
acquireLock, getLock, getLockId, getNumLocksHeld, releaseLock, size
safeRelease
public ReentrantPerEntryLockContainer(int concurrencyLevel)
protected ReentrantLock newLock()
newLock
in class AbstractPerEntryLockContainer<ReentrantLock>
public boolean ownsLock(Object key, Object ignored)
LockContainer
key
- object to checkignored
- owner to testpublic boolean isLocked(Object key)
key
- objectprotected void unlock(ReentrantLock l, Object unused)
unlock
in class AbstractLockContainer<ReentrantLock>
protected boolean tryLock(ReentrantLock lock, long timeout, TimeUnit unit, Object unused) throws InterruptedException
tryLock
in class AbstractLockContainer<ReentrantLock>
InterruptedException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.