Class OPartitionedLockManager<T>
java.lang.Object
com.orientechnologies.common.concur.lock.OPartitionedLockManager<T>
- All Implemented Interfaces:
OLockManager<T>
Lock manager implementation that uses multipel partitions to increase the level of concurrency
without having to keep one entry per locked key, like for
OOneEntryPerKeyLockManager
implementation.- Since:
- 8/11/14
- Author:
- Andrey Lomakin (a.lomakin-at-orientdb.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacquireExclusiveLock(int value) acquireExclusiveLock(long value) acquireExclusiveLock(T value) Lock[]acquireExclusiveLocksInBatch(int[] values) Lock[]acquireExclusiveLocksInBatch(Collection<T> values) final Lock[]acquireExclusiveLocksInBatch(T... value) acquireSharedLock(int value) acquireSharedLock(long value) acquireSharedLock(T value) final Lock[]acquireSharedLocksInBatch(T... value) voidreleaseExclusiveLock(int value) voidreleaseExclusiveLock(long value) voidreleaseExclusiveLock(T value) voidreleaseSharedLock(int value) voidreleaseSharedLock(long value) voidreleaseSharedLock(T value) booleantryAcquireExclusiveLock(int value, long timeout)
-
Constructor Details
-
OPartitionedLockManager
public OPartitionedLockManager() -
OPartitionedLockManager
public OPartitionedLockManager(boolean useSpinLock, boolean useScalableRWLock)
-
-
Method Details
-
acquireExclusiveLock
-
acquireExclusiveLock
-
acquireExclusiveLock
- Specified by:
acquireExclusiveLockin interfaceOLockManager<T>
-
tryAcquireExclusiveLock
- Throws:
InterruptedException
-
acquireExclusiveLocksInBatch
- Specified by:
acquireExclusiveLocksInBatchin interfaceOLockManager<T>
-
acquireExclusiveLocksInBatch
- Specified by:
acquireExclusiveLocksInBatchin interfaceOLockManager<T>
-
acquireExclusiveLocksInBatch
-
releaseExclusiveLock
public void releaseExclusiveLock(int value) -
releaseExclusiveLock
public void releaseExclusiveLock(long value) -
releaseExclusiveLock
- Specified by:
releaseExclusiveLockin interfaceOLockManager<T>
-