net.sf.neem.impl
Class Gossip

java.lang.Object
  extended by net.sf.neem.impl.Gossip
All Implemented Interfaces:
DataListener

public class Gossip
extends java.lang.Object
implements DataListener

Implementation of gossip. Like bimodal, combines a forward retransmission phase with a repair phase. However, the optimistic phase is also gossip based. UUIDs, instead of sequence numbers are used to identify and discard duplicates.


Field Summary
 int ackIn
           
 int ackOut
           
 int dataIn
           
 int dataOut
           
 int deliv
           
 int mcast
           
 int nackIn
           
 int nackOut
           
 
Constructor Summary
Gossip(java.util.Random rand, Transport net, Overlay memb, short dataport, short ctrlport)
          Creates a new instance of Gossip.
 
Method Summary
 int getFanout()
           
 int getMaxIds()
           
 int getMinPullSize()
           
 int getPullPeriod()
           
 int getPushttl()
           
 int getTtl()
           
 void handler(Application handler)
           
 void multicast(java.nio.ByteBuffer[] msg)
           
 void receive(java.nio.ByteBuffer[] msg, Connection info, short port)
          Receive a message from from a connection.
 void resetCounters()
           
 void setFanout(int fanout)
           
 void setMaxIds(int maxIds)
           
 void setMinPullSize(int minPullSize)
           
 void setPullPeriod(int pullPeriod)
           
 void setPushttl(int pushttl)
           
 void setTtl(int ttl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mcast

public int mcast

deliv

public int deliv

dataIn

public int dataIn

dataOut

public int dataOut

ackIn

public int ackIn

ackOut

public int ackOut

nackIn

public int nackIn

nackOut

public int nackOut
Constructor Detail

Gossip

public Gossip(java.util.Random rand,
              Transport net,
              Overlay memb,
              short dataport,
              short ctrlport)
Creates a new instance of Gossip.

Method Detail

handler

public void handler(Application handler)

multicast

public void multicast(java.nio.ByteBuffer[] msg)

receive

public void receive(java.nio.ByteBuffer[] msg,
                    Connection info,
                    short port)
Description copied from interface: DataListener
Receive a message from from a connection. The caller is is prepared to handle a BufferUnderFlowException and will close the connection. Implementations are thus advised to start by unmarshalling the message. If it has been truncated or is invalied, the resulting exception will thus do the right thing

Specified by:
receive in interface DataListener
Parameters:
msg - The incoming message.
info - The source connection.
port - Destination port.

getFanout

public int getFanout()

setFanout

public void setFanout(int fanout)

getMaxIds

public int getMaxIds()

setMaxIds

public void setMaxIds(int maxIds)

getMinPullSize

public int getMinPullSize()

setMinPullSize

public void setMinPullSize(int minPullSize)

getPullPeriod

public int getPullPeriod()

setPullPeriod

public void setPullPeriod(int pullPeriod)

getPushttl

public int getPushttl()

setPushttl

public void setPushttl(int pushttl)

getTtl

public int getTtl()

setTtl

public void setTtl(int ttl)

resetCounters

public void resetCounters()


Copyright © 2005 University of Minho, Portugal. All Rights Reserved.