public class JDBCClusterLock extends Object implements ClusterLock
ClusterLock
implementation to avoid database schema creation and data population from
multiple nodes for JDBC-base databases.Constructor and Description |
---|
JDBCClusterLock() |
public void init(DataAccessManager dataAccessManager, 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(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(String lockName) throws RegistryException
ClusterLock
unlock
in interface ClusterLock
lockName
- the name of the lock.RegistryException
- if an exception occurred while unlocking.Copyright © 2015 WSO2 Inc. All Rights Reserved.