org.infinispan.util.concurrent.locks
Class DeadlockDetectingLockManager
java.lang.Object
org.infinispan.util.concurrent.locks.LockManagerImpl
org.infinispan.util.concurrent.locks.DeadlockDetectingLockManager
- All Implemented Interfaces:
- LockManager
public class DeadlockDetectingLockManager
- extends LockManagerImpl
Lock manager in charge with processing deadlock detections.
- Author:
- Mircea.Markus@jboss.com
Methods inherited from class org.infinispan.util.concurrent.locks.LockManagerImpl |
getConcurrencyLevel, getLockAcquisitionTimeout, getNumberOfLocksAvailable, getNumberOfLocksHeld, getOwner, injectDependencies, isLocked, ownsLock, possiblyLocked, printLockInfo, releaseLocks, startLockManager, unlock, unlock |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
spinDuration
protected volatile long spinDuration
exposeJmxStats
protected volatile boolean exposeJmxStats
DeadlockDetectingLockManager
public DeadlockDetectingLockManager()
init
public void init()
lockAndRecord
public boolean lockAndRecord(Object key,
InvocationContext ctx)
throws InterruptedException
- Description copied from interface:
LockManager
- Acquires a lock of type lockType, on a specific entry in the cache. This method will try for a period of time and
give up if it is unable to acquire the required lock. The period of time is specified in
Configuration.getLockAcquisitionTimeout()
.
- Specified by:
lockAndRecord
in interface LockManager
- Overrides:
lockAndRecord
in class LockManagerImpl
- Parameters:
key
- key to lockctx
- invocation context associated with this invocation
- Returns:
- true if the lock was acquired, false otherwise.
- Throws:
InterruptedException
- if interrupted
setExposeJmxStats
public void setExposeJmxStats(boolean exposeJmxStats)
getOverlapWithNotDeadlockAwareLockOwners
public long getOverlapWithNotDeadlockAwareLockOwners()
getLocallyInterruptedTransactions
public long getLocallyInterruptedTransactions()
getDetectedRemoteDeadlocks
public long getDetectedRemoteDeadlocks()
getDetectedLocalDeadlocks
public long getDetectedLocalDeadlocks()
getTotalNumberOfDetectedDeadlocks
public long getTotalNumberOfDetectedDeadlocks()
resetStatistics
public void resetStatistics()
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.