org.jboss.messaging.core.distributed.replicator
Class ReplicatorOutput
java.lang.Object
org.jboss.messaging.core.distributed.PeerSupport
org.jboss.messaging.core.distributed.replicator.ReplicatorPeer
org.jboss.messaging.core.distributed.replicator.ReplicatorOutput
- All Implemented Interfaces:
- Distributed, Peer, PeerFacade, org.jboss.messaging.core.distributed.replicator.ReplicatorOutputFacade, ServerFacade
- public class ReplicatorOutput
- extends org.jboss.messaging.core.distributed.replicator.ReplicatorPeer
- implements Distributed, org.jboss.messaging.core.distributed.replicator.ReplicatorOutputFacade
A Replicator is a distributed receiver that replicates synchronously or asynchronously a message
to multiple receivers living in different address spaces. A replicator could have
multiple inputs and multiple outputs. Messages sent by an input are replicated to every output.
The replication of messages is done efficiently by multicasting, but message acknowledment is
handled by the replicator (so far) in a point-to-point manner. For that reason, each replicator
peer must be able to synchronously reach any other peer. When it is configured to be synchronous,
the replicator works pretty much like a distributed PointToMultipointRouter.
- Version:
- $Revision: 1026 $
$Id: ReplicatorOutput.java 1026 2006-07-27 19:01:57Z timfox $
- Author:
- Ovidiu Feodorov
Methods inherited from class org.jboss.messaging.core.distributed.PeerSupport |
exclude, getDispatcher, getGroupID, getPeerIdentity, getView, hasJoined, include, join, leave, ping, ping |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
REPLICATOR_OUTPUT_COLLECTOR_ADDRESS
public static final java.lang.String REPLICATOR_OUTPUT_COLLECTOR_ADDRESS
- See Also:
- Constant Field Values
ms
protected MessageStore ms
receiver
protected Receiver receiver
channelListener
protected ChannelListener channelListener
messageListener
protected DelegatingMessageListener messageListener
ignoredReplicatorPeerID
protected java.io.Serializable ignoredReplicatorPeerID
ReplicatorOutput
public ReplicatorOutput(java.io.Serializable replicatorID,
RpcDispatcher dispatcher,
MessageStore ms,
Receiver receiver)
close
public void close()
throws DistributedException
- Specified by:
close
in interface Distributed
- Throws:
DistributedException
getPeer
public Peer getPeer()
- Specified by:
getPeer
in interface Distributed
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
- Overrides:
getID
in class PeerSupport
getReplicatorID
public java.io.Serializable getReplicatorID()
getReceiver
public Receiver getReceiver()
ignore
public void ignore(java.io.Serializable replicatorPeerID)
- The replicator output can be configured to discard message coming from a certain replicator
input. This feature is an optimization for certain topologies such a distributed topic, where
the local replicator output doesn't need to process messages multicast by the associated
replicator.
TODO this is an experimental feature, currently discards messages coming from only ONE replicator
toString
public java.lang.String toString()
doJoin
protected void doJoin()
throws DistributedException
- Specified by:
doJoin
in class PeerSupport
- Throws:
DistributedException
doLeave
protected void doLeave()
throws DistributedException
- Specified by:
doLeave
in class PeerSupport
- Throws:
DistributedException
getRemotePeerInfo
protected RemotePeerInfo getRemotePeerInfo()
- Description copied from class:
PeerSupport
- Create a representation of myself to be returned to other peers that need this information.
- Specified by:
getRemotePeerInfo
in class PeerSupport
createRemotePeer
protected RemotePeer createRemotePeer(RemotePeerInfo thatPeerInfo)
- Description copied from class:
PeerSupport
- Create a local representation of a remote peer.
- Specified by:
createRemotePeer
in class PeerSupport
Copyright © 2006 JBoss Inc. All Rights Reserved.