@ThreadSafe public abstract class AbstractSharedLockContainer<E> extends Object implements LockContainer<E>
Constructor and Description |
---|
AbstractSharedLockContainer() |
Modifier and Type | Method and Description |
---|---|
void |
acquireLock(E object) |
boolean |
acquireLock(E object,
long timeout,
TimeUnit unit) |
protected int |
calculateNumberOfSegments(int concurrencyLevel) |
protected abstract void |
initLocks(int numLocks) |
void |
releaseLock(E object) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLock, getNumLocksHeld, isLocked, ownsLock, reset, size
protected int calculateNumberOfSegments(int concurrencyLevel)
protected abstract void initLocks(int numLocks)
public void acquireLock(E object)
acquireLock
in interface LockContainer<E>
public boolean acquireLock(E object, long timeout, TimeUnit unit) throws InterruptedException
acquireLock
in interface LockContainer<E>
InterruptedException
public void releaseLock(E object)
releaseLock
in interface LockContainer<E>
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.