public class HLockManagerImpl extends AbstractLockManager
cluster, DUMMY_VALUE, keyspace, lockManagerConfigurator| Constructor and Description |
|---|
HLockManagerImpl(Cluster cluster,
HLockManagerConfigurator hlc) |
| Modifier and Type | Method and Description |
|---|---|
void |
acquire(HLock lock)
Acquires a lock represented by lock.getPath and filling up the lockId with
a unique client/caller lock id.
|
void |
acquire(HLock lock,
long timeout)
Acquires a lock represented by lock.getPath and filling up the lockId with
a unique client/caller lock id.
|
HLock |
createLock(String lockPath)
Creates a lock instance to use later on acquire(HLock)
|
void |
release(HLock lock)
Releases the lock
|
void |
shutdownScheduler()
Here for testing purposes only, this should never really be invoked
|
getCluster, getKeyspace, getLockManagerConfigurator, init, setCluster, setKeyspace, setLockManagerConfiguratorpublic HLockManagerImpl(Cluster cluster, HLockManagerConfigurator hlc)
public void acquire(HLock lock)
HLockManagerlock - a lock object with path identifying the lock path to lock onpublic void acquire(HLock lock, long timeout)
lock - a lock object with path identifying the lock path to lock ontimeout - The time to wait for acquiring a lock in millisecondspublic void shutdownScheduler()
public void release(HLock lock)
HLockManagerlock - a lock to releasepublic HLock createLock(String lockPath)
HLockManagerCopyright © 2014. All Rights Reserved.