|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.registry.core.jdbc.dataaccess.JDBCClusterLock
public class JDBCClusterLock
A ClusterLock
implementation to avoid database schema creation and data population from
multiple nodes for JDBC-base databases.
Constructor Summary | |
---|---|
JDBCClusterLock()
|
Method Summary | |
---|---|
void |
init(DataAccessManager dataAccessManager,
java.lang.String clusterLockTableStatement)
Initializes the Node Group Lock Object. |
void |
lock(java.lang.String lockName)
Creates a lock by the given name |
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 |
Constructor Detail |
---|
public JDBCClusterLock()
Method Detail |
---|
public void init(DataAccessManager dataAccessManager, java.lang.String clusterLockTableStatement) throws RegistryException
ClusterLock
init
in interface ClusterLock
dataAccessManager
- the data access manager to be used to communicate with the
database.clusterLockTableStatement
- the SQL statement required create the cluster lock table.
RegistryException
- if the creation of the cluster lock table failed, or if any
exceptions occur during the initialization.public void lock(java.lang.String lockName) throws RegistryException
ClusterLock
lock
in interface ClusterLock
lockName
- the name of the lock.
RegistryException
- if an exception occurred while locking.public void unlock(java.lang.String lockName) throws RegistryException
ClusterLock
unlock
in interface ClusterLock
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 |