public class StripedLockContainer extends Object implements LockContainer
Constructor and Description |
---|
StripedLockContainer(int concurrencyLevel) |
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() |
public ExtendedLockPromise acquire(Object key, Object lockOwner, long time, TimeUnit timeUnit)
acquire
in interface LockContainer
key
- the key to lock.public void release(Object key, Object lockOwner)
release
in interface LockContainer
public InfinispanLock getLock(Object key)
getLock
in interface LockContainer
key
- the key to lock.null
.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.