org.infinispan.util.concurrent.locks.containers
Class AbstractStripedLockContainer
java.lang.Object
org.infinispan.util.concurrent.locks.containers.AbstractStripedLockContainer
- All Implemented Interfaces:
- LockContainer
- Direct Known Subclasses:
- OwnableReentrantStripedLockContainer, ReentrantStripedLockContainer
@ThreadSafe
public abstract class AbstractStripedLockContainer
- extends Object
- implements LockContainer
A container for locks. Used with lock striping.
- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractStripedLockContainer
public AbstractStripedLockContainer()
initLocks
protected abstract void initLocks(int numLocks)
acquireLock
public boolean acquireLock(Object key,
long timeout,
TimeUnit unit)
throws InterruptedException
- Specified by:
acquireLock
in interface LockContainer
- Throws:
InterruptedException
releaseLock
public void releaseLock(Object key)
- Specified by:
releaseLock
in interface LockContainer
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.