org.codehaus.wadi.jgroups
Class JGroupsCluster
java.lang.Object
org.codehaus.wadi.group.impl.AbstractCluster
org.codehaus.wadi.jgroups.JGroupsCluster
- All Implemented Interfaces:
- org.codehaus.wadi.group.Cluster, org.jgroups.MembershipListener, org.jgroups.MessageListener
public class JGroupsCluster
- extends org.codehaus.wadi.group.impl.AbstractCluster
- implements org.jgroups.MembershipListener, org.jgroups.MessageListener
A WADI Cluster mapped onto a JGroups Channel
- Version:
- $Revision: 2415 $
- Author:
- Jules Gosnell
Fields inherited from class org.codehaus.wadi.group.impl.AbstractCluster |
_addressToPeer, _backendKeyToPeer, _cluster, _clusterName, _clusterPeer, _localPeer, _localPeerName, _log, dispatcher |
Constructor Summary |
JGroupsCluster(java.lang.String clusterName,
java.lang.String localPeerName,
java.lang.String config,
JGroupsDispatcher dispatcher,
org.codehaus.wadi.group.EndPoint endPoint)
|
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,
org.codehaus.wadi.group.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 org.codehaus.wadi.group.LocalPeer getLocalPeer()
- Specified by:
getLocalPeer
in interface org.codehaus.wadi.group.Cluster
getPeerFromAddress
public org.codehaus.wadi.group.Peer getPeerFromAddress(org.codehaus.wadi.group.Address address)
- Specified by:
getPeerFromAddress
in interface org.codehaus.wadi.group.Cluster
start
public void start()
throws org.codehaus.wadi.group.ClusterException
- Specified by:
start
in interface org.codehaus.wadi.group.Cluster
- Throws:
org.codehaus.wadi.group.ClusterException
stop
public void stop()
throws org.codehaus.wadi.group.ClusterException
- Specified by:
stop
in interface org.codehaus.wadi.group.Cluster
- Throws:
org.codehaus.wadi.group.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 org.codehaus.wadi.group.Address getAddress()
- Specified by:
getAddress
in interface org.codehaus.wadi.group.Cluster
send
public void send(org.codehaus.wadi.group.Address target,
org.codehaus.wadi.group.Envelope message)
throws org.codehaus.wadi.group.MessageExchangeException
- Throws:
org.codehaus.wadi.group.MessageExchangeException
getChannel
public org.jgroups.Channel getChannel()
extractKeyFromPeerSerialization
protected java.lang.Object extractKeyFromPeerSerialization(java.lang.Object backend)
- Specified by:
extractKeyFromPeerSerialization
in class org.codehaus.wadi.group.impl.AbstractCluster
createPeerFromPeerSerialization
protected org.codehaus.wadi.group.Peer createPeerFromPeerSerialization(java.lang.Object backend)
- Specified by:
createPeerFromPeerSerialization
in class org.codehaus.wadi.group.impl.AbstractCluster
Copyright © 2010. All Rights Reserved.