org.codehaus.wadi.group.vm
Class VMLocalCluster

java.lang.Object
  extended by org.codehaus.wadi.group.vm.VMLocalCluster
All Implemented Interfaces:
Cluster

public class VMLocalCluster
extends java.lang.Object
implements Cluster

Version:
$Revision: 1603 $

Constructor Summary
VMLocalCluster(VMBroker delegate, LocalPeer node, VMDispatcher dispatcher)
           
 
Method Summary
 void addClusterListener(ClusterListener listener)
           
 Address getAddress()
           
 java.lang.String getClusterName()
           
 Dispatcher getDispatcher()
           
 LocalPeer getLocalPeer()
           
 java.lang.String getName()
           
 int getPeerCount()
           
 Peer getPeerFromAddress(Address address)
           
 java.util.Map getRemotePeers()
           
 void removeClusterListener(ClusterListener listener)
           
 void start()
           
 void stop()
           
 java.lang.String toString()
           
 boolean waitOnMembershipCount(int membershipCount, long timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VMLocalCluster

public VMLocalCluster(VMBroker delegate,
                      LocalPeer node,
                      VMDispatcher dispatcher)
Method Detail

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 return
timeout - - 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 © 2008. All Rights Reserved.