org.jumpmind.symmetric.service.impl
Class ClusterService

java.lang.Object
  extended by org.jumpmind.symmetric.service.impl.ClusterService
All Implemented Interfaces:
IClusterService

public class ClusterService
extends java.lang.Object
implements IClusterService


Field Summary
protected static java.lang.String COMMON_LOCK_ID
           
protected  org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
           
protected static org.apache.commons.logging.Log logger
           
protected  IParameterService parameterService
           
 
Constructor Summary
ClusterService()
           
 
Method Summary
 void clearAllLocks()
           
protected  org.springframework.jdbc.core.simple.SimpleJdbcTemplate getSimpleTemplate()
           
 java.lang.String getSql(java.lang.String key)
           
 void initLockTable()
           
 void initLockTable(LockAction action, java.lang.String lockId)
           
 void initLockTableForNode(Node node)
           
 boolean lock(LockAction action)
           
 boolean lock(LockAction action, Node node)
           
 void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbc)
           
 void setNodeService(INodeService nodeService)
           
 void setParameterService(IParameterService parameterService)
           
 void setSql(java.util.Map<java.lang.String,java.lang.String> sql)
           
 void unlock(LockAction action)
           
 void unlock(LockAction action, Node node)
           
protected  java.sql.SQLException unwrapSqlException(java.lang.Throwable e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.commons.logging.Log logger

COMMON_LOCK_ID

protected static final java.lang.String COMMON_LOCK_ID
See Also:
Constant Field Values

parameterService

protected IParameterService parameterService

jdbcTemplate

protected org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
Constructor Detail

ClusterService

public ClusterService()
Method Detail

initLockTable

public void initLockTable()
Specified by:
initLockTable in interface IClusterService

initLockTableForNode

public void initLockTableForNode(Node node)
Specified by:
initLockTableForNode in interface IClusterService

initLockTable

public void initLockTable(LockAction action,
                          java.lang.String lockId)
Specified by:
initLockTable in interface IClusterService

clearAllLocks

public void clearAllLocks()
Specified by:
clearAllLocks in interface IClusterService

lock

@Transactional(propagation=REQUIRES_NEW)
public boolean lock(LockAction action,
                                  Node node)
Specified by:
lock in interface IClusterService

lock

@Transactional(propagation=REQUIRES_NEW)
public boolean lock(LockAction action)
Specified by:
lock in interface IClusterService

unlock

@Transactional(propagation=REQUIRES_NEW)
public void unlock(LockAction action)
Specified by:
unlock in interface IClusterService

unlock

@Transactional(propagation=REQUIRES_NEW)
public void unlock(LockAction action,
                                 Node node)
Specified by:
unlock in interface IClusterService

setNodeService

public void setNodeService(INodeService nodeService)

setJdbcTemplate

public void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbc)

getSimpleTemplate

protected org.springframework.jdbc.core.simple.SimpleJdbcTemplate getSimpleTemplate()

unwrapSqlException

protected java.sql.SQLException unwrapSqlException(java.lang.Throwable e)

setSql

public void setSql(java.util.Map<java.lang.String,java.lang.String> sql)

getSql

public java.lang.String getSql(java.lang.String key)

setParameterService

public void setParameterService(IParameterService parameterService)


Copyright © 2007-2008. All Rights Reserved.