org.codehaus.wadi.jgroups
Class JGroupsCluster
java.lang.Object
org.codehaus.wadi.group.impl.AbstractCluster
org.codehaus.wadi.jgroups.JGroupsCluster
- All Implemented Interfaces:
- Cluster, org.jgroups.MembershipListener, org.jgroups.MessageListener
public class JGroupsCluster
- extends AbstractCluster
- implements org.jgroups.MembershipListener, org.jgroups.MessageListener
A WADI Cluster mapped onto a JGroups Channel
- Version:
- $Revision: 2421 $
- Author:
- Jules Gosnell
Methods inherited from class org.codehaus.wadi.group.impl.AbstractCluster |
addClusterListener, get, getClusterName, getDispatcher, getPeer, getPeerCount, getPeerFromBackEndKey, getRemotePeers, notifyMembershipChanged, removeClusterListener, waitOnMembershipCount |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_excludeSelf
protected final boolean _excludeSelf
- See Also:
- Constant Field Values
_viewLatch
protected final java.util.concurrent.CountDownLatch _viewLatch
_viewThread
protected final JGroupsCluster.ViewThread _viewThread
_channel
protected final org.jgroups.Channel _channel
_dispatcher
protected final JGroupsDispatcher _dispatcher
_localJGAddress
protected org.jgroups.Address _localJGAddress
_viewQueue
protected final java.util.concurrent.SynchronousQueue<java.util.Set> _viewQueue
JGroupsCluster
public JGroupsCluster(java.lang.String clusterName,
java.lang.String localPeerName,
java.lang.String config,
JGroupsDispatcher dispatcher,
EndPoint endPoint)
throws org.jgroups.ChannelException
- Throws:
org.jgroups.ChannelException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getLocalPeer
public LocalPeer getLocalPeer()
- Specified by:
getLocalPeer
in interface Cluster
getPeerFromAddress
public Peer getPeerFromAddress(Address address)
- Specified by:
getPeerFromAddress
in interface Cluster
start
public void start()
throws ClusterException
- Specified by:
start
in interface Cluster
- Throws:
ClusterException
stop
public void stop()
throws ClusterException
- Specified by:
stop
in interface Cluster
- Throws:
ClusterException
viewAccepted
public void viewAccepted(org.jgroups.View newView)
- Specified by:
viewAccepted
in interface org.jgroups.MembershipListener
nextView
public void nextView(java.util.Set newMembers)
suspect
public void suspect(org.jgroups.Address suspected_mbr)
- Specified by:
suspect
in interface org.jgroups.MembershipListener
block
public void block()
- Specified by:
block
in interface org.jgroups.MembershipListener
receive
public void receive(org.jgroups.Message msg)
- Specified by:
receive
in interface org.jgroups.MessageListener
getState
public byte[] getState()
- Specified by:
getState
in interface org.jgroups.MessageListener
setState
public void setState(byte[] state)
- Specified by:
setState
in interface org.jgroups.MessageListener
getAddress
public Address getAddress()
- Specified by:
getAddress
in interface Cluster
send
public void send(Address target,
Envelope message)
throws MessageExchangeException
- Throws:
MessageExchangeException
getChannel
public org.jgroups.Channel getChannel()
extractKeyFromPeerSerialization
protected java.lang.Object extractKeyFromPeerSerialization(java.lang.Object backend)
- Specified by:
extractKeyFromPeerSerialization
in class AbstractCluster
createPeerFromPeerSerialization
protected Peer createPeerFromPeerSerialization(java.lang.Object backend)
- Specified by:
createPeerFromPeerSerialization
in class AbstractCluster
Copyright © 2010. All Rights Reserved.