org.codehaus.wadi.group.vm
Class VMLocalCluster
java.lang.Object
org.codehaus.wadi.group.vm.VMLocalCluster
- All Implemented Interfaces:
- Cluster
public class VMLocalCluster
- extends java.lang.Object
- implements Cluster
- Version:
- $Revision: 1603 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VMLocalCluster
public VMLocalCluster(VMBroker delegate,
LocalPeer node,
VMDispatcher dispatcher)
getClusterName
public java.lang.String getClusterName()
- Specified by:
getClusterName
in interface Cluster
getDispatcher
public Dispatcher getDispatcher()
- Specified by:
getDispatcher
in interface Cluster
getName
public java.lang.String getName()
getPeerCount
public int getPeerCount()
- Specified by:
getPeerCount
in interface Cluster
getAddress
public Address getAddress()
- Specified by:
getAddress
in interface Cluster
getPeerFromAddress
public Peer getPeerFromAddress(Address address)
- Specified by:
getPeerFromAddress
in interface Cluster
addClusterListener
public void addClusterListener(ClusterListener listener)
- Specified by:
addClusterListener
in interface Cluster
removeClusterListener
public void removeClusterListener(ClusterListener listener)
- Specified by:
removeClusterListener
in interface Cluster
getRemotePeers
public java.util.Map getRemotePeers()
- Specified by:
getRemotePeers
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
waitOnMembershipCount
public boolean waitOnMembershipCount(int membershipCount,
long timeout)
throws java.lang.InterruptedException
- Specified by:
waitOnMembershipCount
in interface Cluster
- Parameters:
membershipCount
- - when membership reaches this number or we timeout this method will returntimeout
- - the number of milliseconds to wait for membership to hit membershipCount
- Returns:
- whether or not expected membershipCount was hit within given time
- Throws:
java.lang.InterruptedException
getLocalPeer
public LocalPeer getLocalPeer()
- Specified by:
getLocalPeer
in interface Cluster
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2011. All Rights Reserved.