org.jboss.messaging.core.distributed.replicator
Class ReplicatorTopology

java.lang.Object
  extended byjava.util.Observable
      extended byorg.jboss.messaging.core.distributed.replicator.ReplicatorTopology
All Implemented Interfaces:
org.jboss.messaging.core.distributed.replicator.ReplicatorTopologyServerDelegate, ServerFacade

public class ReplicatorTopology
extends java.util.Observable
implements org.jboss.messaging.core.distributed.replicator.ReplicatorTopologyServerDelegate

The Observers interested in topology changes should register here.

Version:
$Revision: 1174 $
Author:
Ovidiu Feodorov

Field Summary
protected  Replicator peer
           
protected  java.util.Map topology
          
 
Method Summary
 void aquireInitialTopology(RpcDispatcher dispatcher)
           
 Address getAddress(java.io.Serializable outputPeerID)
           
 java.io.Serializable getID()
          Return the ID under which server object is registered with the RpcServer.
 java.util.Set getView()
          Returns a copy of the current view.
 java.util.Map getViewMap()
          Returns a copy of the current view map.
 void outputPeerJoins(java.io.Serializable joiningPeerID, Address address)
          Remote method invoked by an output peer on all input peers' topologies when joining the replicator.
 void outputPeerLeaves(java.io.Serializable leavingPeerID)
          Remote method invoked by a leaving output peer on all topologies.
 void registerTopologyListener(java.util.Observer observer)
           
 void stop()
          Frees up resources and detaches the observers.
 java.lang.String toString()
           
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

peer

protected Replicator peer

topology

protected java.util.Map topology

Method Detail

getID

public java.io.Serializable getID()
Description copied from interface: ServerFacade
Return the ID under which server object is registered with the RpcServer.

Specified by:
getID in interface ServerFacade

outputPeerJoins

public void outputPeerJoins(java.io.Serializable joiningPeerID,
                            Address address)
                     throws java.lang.Exception
Description copied from interface: org.jboss.messaging.core.distributed.replicator.ReplicatorTopologyServerDelegate
Remote method invoked by an output peer on all input peers' topologies when joining the replicator.

Specified by:
outputPeerJoins in interface org.jboss.messaging.core.distributed.replicator.ReplicatorTopologyServerDelegate
Throws:
java.lang.Exception - - negative acknowledgment. The join is vetoed (willingly or unwillingly) by this member.

outputPeerLeaves

public void outputPeerLeaves(java.io.Serializable leavingPeerID)
Description copied from interface: org.jboss.messaging.core.distributed.replicator.ReplicatorTopologyServerDelegate
Remote method invoked by a leaving output peer on all topologies.

Specified by:
outputPeerLeaves in interface org.jboss.messaging.core.distributed.replicator.ReplicatorTopologyServerDelegate

getView

public java.util.Set getView()
Description copied from interface: org.jboss.messaging.core.distributed.replicator.ReplicatorTopologyServerDelegate
Returns a copy of the current view.

Specified by:
getView in interface org.jboss.messaging.core.distributed.replicator.ReplicatorTopologyServerDelegate
Returns:
a set of output peer IDs.

getViewMap

public java.util.Map getViewMap()
Description copied from interface: org.jboss.messaging.core.distributed.replicator.ReplicatorTopologyServerDelegate
Returns a copy of the current view map.

Specified by:
getViewMap in interface org.jboss.messaging.core.distributed.replicator.ReplicatorTopologyServerDelegate
Returns:
a Map containing .

getAddress

public Address getAddress(java.io.Serializable outputPeerID)

aquireInitialTopology

public void aquireInitialTopology(RpcDispatcher dispatcher)
                           throws DistributedException
Throws:
DistributedException

registerTopologyListener

public void registerTopologyListener(java.util.Observer observer)

stop

public void stop()
Frees up resources and detaches the observers.


toString

public java.lang.String toString()


Copyright © 2006 JBoss Inc. All Rights Reserved.