public static interface TxnStore.MutexAPI
LockHandle uses a java.sql.Connection so use it sparingly.| Modifier and Type | Interface and Description |
|---|---|
static interface |
TxnStore.MutexAPI.LockHandle |
| Modifier and Type | Method and Description |
|---|---|
TxnStore.MutexAPI.LockHandle |
acquireLock(String key)
The
key is name of the lock. |
void |
acquireLock(String key,
TxnStore.MutexAPI.LockHandle handle)
Same as
acquireLock(String) but takes an already existing handle as input. |
TxnStore.MutexAPI.LockHandle acquireLock(String key) throws MetaException
key is name of the lock. Will acquire an exclusive lock or block. It returns
a handle which must be used to release the lock. Each invocation returns a new handle.MetaExceptionvoid acquireLock(String key, TxnStore.MutexAPI.LockHandle handle) throws MetaException
acquireLock(String) but takes an already existing handle as input. This
will associate the lock on key with the same handle. All locks associated with
the same handle will be released together.handle - not NULLMetaExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.