|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.registry.core.clustering.NodeGroupLock
public class NodeGroupLock
This utilizes the environment's cluster lock to ensure that no more than a single master node exists.
Field Summary | |
---|---|
static java.lang.String |
INITIALIZE_LOCK
The name of the lock used during the initialization process. |
Constructor Summary | |
---|---|
NodeGroupLock()
|
Method Summary | |
---|---|
static void |
init(DataAccessManager dataAccessManager)
Initializes the Node Group Lock Object. |
static void |
lock(java.lang.String lockName)
Creates a lock by the given name |
static void |
unlock(java.lang.String lockName)
Unlocks a named lock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String INITIALIZE_LOCK
Constructor Detail |
---|
public NodeGroupLock()
Method Detail |
---|
public static void init(DataAccessManager dataAccessManager) throws RegistryException
dataAccessManager
- the data access manager to be used to communicate with the
database.
RegistryException
- if the creation of the cluster lock table failed, or if any
exceptions occur during the initialization.public static void lock(java.lang.String lockName) throws RegistryException
lockName
- the name of the lock.
RegistryException
- if an exception occurred while locking.public static void unlock(java.lang.String lockName) throws RegistryException
lockName
- the name of the lock.
RegistryException
- if an exception occurred while unlocking.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |