T
- Type of keyspublic class OOneEntryPerKeyLockManager<T> extends Object implements OLockManager<T>
OPartitionedLockManager
when running distributed because there is no
way toModifier and Type | Class and Description |
---|---|
static class |
OOneEntryPerKeyLockManager.LOCK |
Modifier and Type | Field and Description |
---|---|
protected com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap<T,com.orientechnologies.common.concur.lock.OOneEntryPerKeyLockManager.CountableLock> |
map |
Constructor and Description |
---|
OOneEntryPerKeyLockManager(boolean iEnabled,
int iAcquireTimeout,
int amountOfCachedInstances) |
OOneEntryPerKeyLockManager(boolean iEnabled,
int iAcquireTimeout,
int concurrencyLevel,
int amountOfCachedInstances) |
Modifier and Type | Method and Description |
---|---|
Lock |
acquireExclusiveLock(T key) |
Lock[] |
acquireExclusiveLocksInBatch(Collection<T> values) |
Lock[] |
acquireExclusiveLocksInBatch(T... values) |
Lock |
acquireLock(T iResourceId,
OOneEntryPerKeyLockManager.LOCK iLockType) |
Lock |
acquireLock(T iResourceId,
OOneEntryPerKeyLockManager.LOCK iLockType,
long iTimeout) |
protected Lock[] |
acquireLockInBatch(T[] values,
boolean exclusiveMode) |
Lock |
acquireSharedLock(T key) |
Lock[] |
acquireSharedLocksInBatch(T... values) |
int |
getCountCurrentLocks() |
protected T |
getImmutableResourceId(T iResourceId) |
void |
releaseExclusiveLock(T key) |
void |
releaseLock(Object iRequester,
T iResourceId,
OOneEntryPerKeyLockManager.LOCK iLockType) |
void |
releaseSharedLock(T key) |
protected final com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap<T,com.orientechnologies.common.concur.lock.OOneEntryPerKeyLockManager.CountableLock> map
public OOneEntryPerKeyLockManager(boolean iEnabled, int iAcquireTimeout, int amountOfCachedInstances)
public OOneEntryPerKeyLockManager(boolean iEnabled, int iAcquireTimeout, int concurrencyLevel, int amountOfCachedInstances)
public Lock acquireSharedLock(T key)
acquireSharedLock
in interface OLockManager<T>
public void releaseSharedLock(T key)
releaseSharedLock
in interface OLockManager<T>
public Lock acquireExclusiveLock(T key)
acquireExclusiveLock
in interface OLockManager<T>
public void releaseExclusiveLock(T key)
releaseExclusiveLock
in interface OLockManager<T>
public Lock acquireLock(T iResourceId, OOneEntryPerKeyLockManager.LOCK iLockType)
public Lock acquireLock(T iResourceId, OOneEntryPerKeyLockManager.LOCK iLockType, long iTimeout)
public void releaseLock(Object iRequester, T iResourceId, OOneEntryPerKeyLockManager.LOCK iLockType) throws OLockException
OLockException
public Lock[] acquireExclusiveLocksInBatch(T... values)
acquireExclusiveLocksInBatch
in interface OLockManager<T>
public Lock[] acquireSharedLocksInBatch(T... values)
acquireSharedLocksInBatch
in interface OLockManager<T>
public Lock[] acquireExclusiveLocksInBatch(Collection<T> values)
acquireExclusiveLocksInBatch
in interface OLockManager<T>
public int getCountCurrentLocks()
Copyright © 2009–2020 OrientDB. All rights reserved.