com.liferay.portal.cluster
Class ClusterMasterExecutorImpl
java.lang.Object
com.liferay.portal.cluster.ClusterMasterExecutorImpl
- All Implemented Interfaces:
- ClusterMasterExecutor
public class ClusterMasterExecutorImpl
- extends Object
- implements ClusterMasterExecutor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClusterMasterExecutorImpl
public ClusterMasterExecutorImpl()
destroy
public void destroy()
executeOnMaster
public <T> Future<T> executeOnMaster(MethodHandler methodHandler)
throws SystemException
- Specified by:
executeOnMaster
in interface ClusterMasterExecutor
- Throws:
SystemException
initialize
public void initialize()
- Specified by:
initialize
in interface ClusterMasterExecutor
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interface ClusterMasterExecutor
isMaster
public boolean isMaster()
- Specified by:
isMaster
in interface ClusterMasterExecutor
registerClusterMasterTokenTransitionListener
public void registerClusterMasterTokenTransitionListener(ClusterMasterTokenTransitionListener clusterMasterTokenTransitionListener)
- Specified by:
registerClusterMasterTokenTransitionListener
in interface ClusterMasterExecutor
setClusterExecutor
public void setClusterExecutor(ClusterExecutor clusterExecutor)
setClusterMasterTokenTransitionListeners
public void setClusterMasterTokenTransitionListeners(Set<ClusterMasterTokenTransitionListener> clusterMasterTokenTransitionListeners)
unregisterClusterMasterTokenTransitionListener
public void unregisterClusterMasterTokenTransitionListener(ClusterMasterTokenTransitionListener clusterMasterTokenTransitionListener)
- Specified by:
unregisterClusterMasterTokenTransitionListener
in interface ClusterMasterExecutor
getMasterAddressString
protected String getMasterAddressString()
notifyMasterTokenTransitionListeners
protected void notifyMasterTokenTransitionListeners(boolean masterTokenAcquired)