Class StripedLockContainer
java.lang.Object
org.infinispan.util.concurrent.locks.impl.StripedLockContainer
- All Implemented Interfaces:
- LockContainer
A lock container used with lock stripping.
- Since:
- 8.0
- Author:
- Pedro Ruivo
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddeadlockCheck(DeadlockChecker deadlockChecker) It forces a deadlock checks in all existing locks.intbooleanvoidintsize()toString()
- 
Constructor Details- 
StripedLockContainerpublic StripedLockContainer(int concurrencyLevel) 
 
- 
- 
Method Details- 
acquire- Specified by:
- acquirein interface- LockContainer
- Parameters:
- key- the key to lock.
- Returns:
- the lock for a specific object to be acquired. If the lock does not exists, it is created.
 
- 
release- Specified by:
- releasein interface- LockContainer
 
- 
getLock- Specified by:
- getLockin interface- LockContainer
- Parameters:
- key- the key to lock.
- Returns:
- the lock for a specific object. If the lock does not exists, it return null.
 
- 
getNumLocksHeldpublic int getNumLocksHeld()- Specified by:
- getNumLocksHeldin interface- LockContainer
- Returns:
- number of locks held
 
- 
isLocked- Specified by:
- isLockedin interface- LockContainer
- Parameters:
- key- the key to test.
- Returns:
- trueif the key is locked,- falseotherwise.
 
- 
sizepublic int size()- Specified by:
- sizein interface- LockContainer
- Returns:
- the size of the shared lock pool
 
- 
deadlockCheckDescription copied from interface:LockContainerIt forces a deadlock checks in all existing locks.- Specified by:
- deadlockCheckin interface- LockContainer
 
- 
toString
 
-