Interface CatalinaCluster
- All Known Implementing Classes:
SimpleTcpCluster
A CatalinaCluster interface allows to plug in and out the different cluster implementations
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddClusterListener(ClusterListener listener) Add cluster message listener and register cluster to this listener.voidAdd cluster valve.Returns the channel associated with the cluster.Returns the current Deployer.Returns the member that represents this node.getManager(String name) Get ManagergetManagerName(String name, Manager manager) Get a new cluster name for a manager.Returns the map of managers.Member[]Returns all the members currently participating in the cluster.Valve[]Returns the current cluster valves.booleanChecks if the cluster has members.voidremoveClusterListener(ClusterListener listener) Remove message listener and deregister Cluster from listener.voidsend(ClusterMessage msg) Sends a message to all the members in the clustervoidsend(ClusterMessage msg, Member dest) Sends a message to a specific member in the cluster.voidsend(ClusterMessage msg, Member dest, int sendOptions) Sends a message with the specified sendOptions to a specific member in the cluster.voidsetChannel(Channel channel) Set the channel associated with the cluster.voidsetClusterDeployer(ClusterDeployer deployer) Set a new Deployer, must be set before the cluster started.Methods inherited from interface Cluster
backgroundProcess, createManager, getClusterName, registerManager, removeManager, setClusterNameMethods inherited from interface Contained
getContainer, setContainer
-
Method Details
-
send
Sends a message to all the members in the cluster- Parameters:
msg- ClusterMessage
-
send
Sends a message to a specific member in the cluster.- Parameters:
msg- ClusterMessagedest- Member
-
send
Sends a message with the specified sendOptions to a specific member in the cluster.- Parameters:
msg- ClusterMessagedest- MembersendOptions- sendOptions
-
hasMembers
boolean hasMembers()Checks if the cluster has members.- Returns:
trueif the cluster has members.
-
getMembers
Member[] getMembers()Returns all the members currently participating in the cluster.- Returns:
- an array containing all the members currently participating in the cluster.
-
getLocalMember
Member getLocalMember()Returns the member that represents this node.- Returns:
- the member that represents this node.
-
addValve
Add cluster valve. Cluster Valves are only add to container when cluster is started.- Parameters:
valve- The new cluster Valve.
-
addClusterListener
Add cluster message listener and register cluster to this listener.- Parameters:
listener- The new listener
-
removeClusterListener
Remove message listener and deregister Cluster from listener.- Parameters:
listener- The listener to remove
-
setClusterDeployer
Set a new Deployer, must be set before the cluster started.- Parameters:
deployer- The associated deployer
-
getClusterDeployer
-
getManagers
-
getManager
-
getManagerName
-
getValves
-
setChannel
Set the channel associated with the cluster.- Parameters:
channel- the channel
-
getChannel
Channel getChannel()Returns the channel associated with the cluster.- Returns:
- the channel associated with the cluster
-