public class PerKeyLockContainer extends Object implements LockContainer
Modifier and Type | Field and Description |
---|---|
protected Executor |
nonBlockingExecutor |
Constructor and Description |
---|
PerKeyLockContainer() |
Modifier and Type | Method and Description |
---|---|
ExtendedLockPromise |
acquire(Object key,
Object lockOwner,
long time,
TimeUnit timeUnit) |
void |
deadlockCheck(DeadlockChecker deadlockChecker)
It forces a deadlock checks in all existing locks.
|
InfinispanLock |
getLock(Object key) |
int |
getNumLocksHeld() |
boolean |
isLocked(Object key) |
void |
release(Object key,
Object lockOwner) |
int |
size() |
String |
toString() |
protected Executor nonBlockingExecutor
public ExtendedLockPromise acquire(Object key, Object lockOwner, long time, TimeUnit timeUnit)
acquire
in interface LockContainer
key
- the key to lock.public InfinispanLock getLock(Object key)
getLock
in interface LockContainer
key
- the key to lock.null
.public void release(Object key, Object lockOwner)
release
in interface LockContainer
public int getNumLocksHeld()
getNumLocksHeld
in interface LockContainer
public boolean isLocked(Object key)
isLocked
in interface LockContainer
key
- the key to test.true
if the key is locked, false
otherwise.public int size()
size
in interface LockContainer
public void deadlockCheck(DeadlockChecker deadlockChecker)
LockContainer
deadlockCheck
in interface LockContainer
Copyright © 2021 JBoss by Red Hat. All rights reserved.