public class InProcessLockProvider extends Object implements LockProvider<ReentrantReadWriteLock>, Serializable
LockProvider implementation is to
guard table from concurrent operations happening in the local JVM process.
A separate lock is maintained per "table basepath".
Note: This Lock provider implementation doesn't allow lock reentrancy. Attempting to reacquire the lock from the same thread will throw HoodieLockException. Threads other than the current lock owner, will block on lock() and return false on tryLock().
| Constructor and Description |
|---|
InProcessLockProvider(LockConfiguration lockConfiguration,
StorageConfiguration<?> conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ReentrantReadWriteLock |
getLock() |
void |
lock() |
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrentOwnerLockInfo, lockInterruptibly, newConditionpublic InProcessLockProvider(LockConfiguration lockConfiguration, StorageConfiguration<?> conf)
public void lock()
lock in interface Locklock in interface LockProvider<ReentrantReadWriteLock>public boolean tryLock()
tryLock in interface LocktryLock in interface LockProvider<ReentrantReadWriteLock>public ReentrantReadWriteLock getLock()
getLock in interface LockProvider<ReentrantReadWriteLock>public void close()
close in interface AutoCloseableclose in interface LockProvider<ReentrantReadWriteLock>Copyright © 2024 The Apache Software Foundation. All rights reserved.