Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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: 1.18 $` $Id: ReplicatorOutput.java,v 1.18 2006/03/22 10:23:33 timfox Exp $
Author:
  Ovidiu Feodorov

Nested Class Summary
`protected class` | `ReplicatorOutput.ChannelListenerImpl`
`protected class` | `ReplicatorOutput.MessageListenerImpl`

Field Summary
`protected ChannelListener` | `channelListener`
`protected java.io.Serializable` | `ignoredReplicatorPeerID`
`protected DelegatingMessageListener` | `messageListener`
`protected MessageStore` | `ms`
`protected Receiver` | `receiver`
`static java.lang.String` | `REPLICATOR_OUTPUT_COLLECTOR_ADDRESS`

Fields inherited from class org.jboss.messaging.core.distributed.PeerSupport
`dispatcher, joined, peerID, rpcServer, TIMEOUT, viewKeeper`

Constructor Summary
`ReplicatorOutput(java.io.Serializable replicatorID, RpcDispatcher dispatcher, MessageStore ms, Receiver receiver)`

Method Summary
`void` | `close()`
`protected RemotePeer` | `createRemotePeer(RemotePeerInfo thatPeerInfo)` Create a local representation of a remote peer.
`protected void` | `doJoin()`
`protected void` | `doLeave()`
`java.io.Serializable` | `getID()` Return the ID under which server object is registered with the RpcServer.
`Peer` | `getPeer()`
`Receiver` | `getReceiver()`
`protected RemotePeerInfo` | `getRemotePeerInfo()` Create a representation of myself to be returned to other peers that need this information.
`java.io.Serializable` | `getReplicatorID()`
`void` | `ignore(java.io.Serializable replicatorPeerID)` The replicator output can be configured to discard message coming from a certain replicator input.
`java.lang.String` | `toString()`

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`

Methods inherited from interface org.jboss.messaging.core.distributed.Distributed
`join, leave`

Field Detail

### 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

Constructor Detail

### ReplicatorOutput

    public ReplicatorOutput(java.io.Serializable replicatorID,
                            RpcDispatcher dispatcher,
                            MessageStore ms,
                            Receiver receiver)

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 JBoss Inc. All Rights Reserved.