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 org.apache.hadoop.hive.metastore.api.MetaException
key is name of the lock. Will acquire and exclusive lock or block. It retuns
a handle which must be used to release the lock. Each invocation returns a new handle.org.apache.hadoop.hive.metastore.api.MetaExceptionvoid acquireLock(String key, TxnStore.MutexAPI.LockHandle handle) throws org.apache.hadoop.hive.metastore.api.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 NULLorg.apache.hadoop.hive.metastore.api.MetaExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.