com.liferay.portal.cluster
Class ClusterExecutorImpl

java.lang.Object
  extended by com.liferay.portal.cluster.ClusterBase
      extended by com.liferay.portal.cluster.ClusterExecutorImpl
All Implemented Interfaces:
com.liferay.portal.kernel.cluster.ClusterExecutor, com.liferay.portal.util.PortalPortEventListener

public class ClusterExecutorImpl
extends ClusterBase
implements com.liferay.portal.kernel.cluster.ClusterExecutor, com.liferay.portal.util.PortalPortEventListener

View Source

Author:
Tina Tian, Shuyang Zhou

Field Summary
 
Fields inherited from class com.liferay.portal.cluster.ClusterBase
bindInetAddress
 
Constructor Summary
ClusterExecutorImpl()
           
 
Method Summary
 void addClusterEventListener(com.liferay.portal.kernel.cluster.ClusterEventListener clusterEventListener)
           
 void afterPropertiesSet()
           
 void destroy()
           
 com.liferay.portal.kernel.cluster.FutureClusterResponses execute(com.liferay.portal.kernel.cluster.ClusterRequest clusterRequest)
           
protected  void fireClusterEvent(com.liferay.portal.kernel.cluster.ClusterEvent clusterEvent)
           
 java.util.List<com.liferay.portal.kernel.cluster.ClusterEventListener> getClusterEventListeners()
           
 java.util.List<com.liferay.portal.kernel.cluster.ClusterNode> getClusterNodes()
           
protected  org.jgroups.JChannel getControlChannel()
           
protected  com.liferay.portal.kernel.cluster.FutureClusterResponses getExecutionResults(java.lang.String uuid)
           
 com.liferay.portal.kernel.cluster.ClusterNode getLocalClusterNode()
           
protected  com.liferay.portal.kernel.cluster.Address getLocalControlAddress()
           
protected  void initChannels()
           
 void initialize()
           
 boolean isClusterNodeAlive(java.lang.String clusterNodeId)
           
 boolean isEnabled()
           
protected  boolean isShortcutLocalMethod()
           
protected  void memberJoined(com.liferay.portal.kernel.cluster.Address joinAddress, com.liferay.portal.kernel.cluster.ClusterNode clusterNode)
           
protected  void memberRemoved(java.util.List<com.liferay.portal.kernel.cluster.Address> departAddresses)
           
 void portalPortConfigured(int port)
           
protected  java.util.List<com.liferay.portal.kernel.cluster.Address> prepareAddresses(com.liferay.portal.kernel.cluster.ClusterRequest clusterRequest)
           
 void removeClusterEventListener(com.liferay.portal.kernel.cluster.ClusterEventListener clusterEventListener)
           
protected  com.liferay.portal.kernel.cluster.ClusterNodeResponse runLocalMethod(com.liferay.portal.kernel.util.MethodHandler methodHandler)
           
protected  void sendMulticastRequest(com.liferay.portal.kernel.cluster.ClusterRequest clusterRequest)
           
protected  void sendUnicastRequest(com.liferay.portal.kernel.cluster.ClusterRequest clusterRequest, java.util.List<com.liferay.portal.kernel.cluster.Address> addresses)
           
 void setClusterEventListeners(java.util.List<com.liferay.portal.kernel.cluster.ClusterEventListener> clusterEventListeners)
           
 void setShortcutLocalMethod(boolean shortcutLocalMethod)
           
 
Methods inherited from class com.liferay.portal.cluster.ClusterBase
createJChannel, getAddresses, initBindAddress, initSystemProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterExecutorImpl

public ClusterExecutorImpl()
Method Detail

addClusterEventListener

public void addClusterEventListener(com.liferay.portal.kernel.cluster.ClusterEventListener clusterEventListener)
Specified by:
addClusterEventListener in interface com.liferay.portal.kernel.cluster.ClusterExecutor

afterPropertiesSet

public void afterPropertiesSet()
Overrides:
afterPropertiesSet in class ClusterBase

destroy

public void destroy()
Specified by:
destroy in interface com.liferay.portal.kernel.cluster.ClusterExecutor
Specified by:
destroy in class ClusterBase

execute

public com.liferay.portal.kernel.cluster.FutureClusterResponses execute(com.liferay.portal.kernel.cluster.ClusterRequest clusterRequest)
                                                                 throws com.liferay.portal.SystemException
Specified by:
execute in interface com.liferay.portal.kernel.cluster.ClusterExecutor
Throws:
com.liferay.portal.SystemException

getClusterEventListeners

public java.util.List<com.liferay.portal.kernel.cluster.ClusterEventListener> getClusterEventListeners()
Specified by:
getClusterEventListeners in interface com.liferay.portal.kernel.cluster.ClusterExecutor

getClusterNodes

public java.util.List<com.liferay.portal.kernel.cluster.ClusterNode> getClusterNodes()
Specified by:
getClusterNodes in interface com.liferay.portal.kernel.cluster.ClusterExecutor

getLocalClusterNode

public com.liferay.portal.kernel.cluster.ClusterNode getLocalClusterNode()
                                                                  throws com.liferay.portal.SystemException
Specified by:
getLocalClusterNode in interface com.liferay.portal.kernel.cluster.ClusterExecutor
Throws:
com.liferay.portal.SystemException

initialize

public void initialize()
Specified by:
initialize in interface com.liferay.portal.kernel.cluster.ClusterExecutor

isClusterNodeAlive

public boolean isClusterNodeAlive(java.lang.String clusterNodeId)
Specified by:
isClusterNodeAlive in interface com.liferay.portal.kernel.cluster.ClusterExecutor

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface com.liferay.portal.kernel.cluster.ClusterExecutor
Overrides:
isEnabled in class ClusterBase

portalPortConfigured

public void portalPortConfigured(int port)
Specified by:
portalPortConfigured in interface com.liferay.portal.util.PortalPortEventListener

removeClusterEventListener

public void removeClusterEventListener(com.liferay.portal.kernel.cluster.ClusterEventListener clusterEventListener)
Specified by:
removeClusterEventListener in interface com.liferay.portal.kernel.cluster.ClusterExecutor

setClusterEventListeners

public void setClusterEventListeners(java.util.List<com.liferay.portal.kernel.cluster.ClusterEventListener> clusterEventListeners)

setShortcutLocalMethod

public void setShortcutLocalMethod(boolean shortcutLocalMethod)

fireClusterEvent

protected void fireClusterEvent(com.liferay.portal.kernel.cluster.ClusterEvent clusterEvent)

getControlChannel

protected org.jgroups.JChannel getControlChannel()

getExecutionResults

protected com.liferay.portal.kernel.cluster.FutureClusterResponses getExecutionResults(java.lang.String uuid)

getLocalControlAddress

protected com.liferay.portal.kernel.cluster.Address getLocalControlAddress()

initChannels

protected void initChannels()
Specified by:
initChannels in class ClusterBase

isShortcutLocalMethod

protected boolean isShortcutLocalMethod()

memberJoined

protected void memberJoined(com.liferay.portal.kernel.cluster.Address joinAddress,
                            com.liferay.portal.kernel.cluster.ClusterNode clusterNode)

memberRemoved

protected void memberRemoved(java.util.List<com.liferay.portal.kernel.cluster.Address> departAddresses)

prepareAddresses

protected java.util.List<com.liferay.portal.kernel.cluster.Address> prepareAddresses(com.liferay.portal.kernel.cluster.ClusterRequest clusterRequest)

runLocalMethod

protected com.liferay.portal.kernel.cluster.ClusterNodeResponse runLocalMethod(com.liferay.portal.kernel.util.MethodHandler methodHandler)
                                                                        throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

sendMulticastRequest

protected void sendMulticastRequest(com.liferay.portal.kernel.cluster.ClusterRequest clusterRequest)
                             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

sendUnicastRequest

protected void sendUnicastRequest(com.liferay.portal.kernel.cluster.ClusterRequest clusterRequest,
                                  java.util.List<com.liferay.portal.kernel.cluster.Address> addresses)
                           throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException