|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.usergrid.locking.cassandra.HectorLockManagerImpl
public class HectorLockManagerImpl
Uses the hector based locking implementation to obtain locks
Constructor Summary | |
---|---|
HectorLockManagerImpl()
|
Method Summary | |
---|---|
Lock |
createLock(UUID applicationId,
String... path)
Acquires a lock on a particular path. |
void |
init()
|
void |
setCluster(me.prettyprint.hector.api.Cluster cluster)
|
void |
setKeyspaceName(String keyspaceName)
|
void |
setLockTtl(long lockTtl)
The amount of time a lock must not be renewed before it times out. |
void |
setNumberOfLockObserverThreads(int numberOfLockObserverThreads)
Set the number of threads the lock heartbeat executor uses. |
void |
setReplicationFactor(int replicationFactor)
Note that in a real environment this MUST be an odd number. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HectorLockManagerImpl()
Method Detail |
---|
@PostConstruct public void init()
public Lock createLock(UUID applicationId, String... path) throws UGLockException
LockManager
createLock
in interface LockManager
applicationId
- application UUIDpath
- a unique path
UGLockException
- if the lock cannot be acquiredpublic void setReplicationFactor(int replicationFactor)
replicationFactor
- the replicationFactor to setpublic void setNumberOfLockObserverThreads(int numberOfLockObserverThreads)
numberOfLockObserverThreads
- the numberOfLockObserverThreads to setpublic void setLockTtl(long lockTtl)
lockTtl
- the lockTtl to setpublic void setKeyspaceName(String keyspaceName)
keyspaceName
- the keyspaceName to setpublic void setCluster(me.prettyprint.hector.api.Cluster cluster)
cluster
- the cluster to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |