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