appia.protocols.fifo.fifomulticast
Class PeerInfo

java.lang.Object
  |
  +--appia.protocols.fifo.fifomulticast.PeerInfo

public class PeerInfo
extends java.lang.Object

PeerInfo contains next expected sequence number, next sequence number to send and out of order messages for a single peer of a fifo session. It is a implementation support class of the FIFO protocol. Problems may arise with queuing of messages when crossing from the highest sequence number possible ((2^31)-1) to 0. Enqueue of out-of-order messages is not available for messages between 0 and queueSize. Reliability or ordering is not compromised with this feature. Only efficiency might be slightly compromised.


Field Summary
 boolean failed
           
 int firstUnconfirmed
           
 java.util.LinkedList headers
           
 int lastAckSent
           
 long lastUsed
           
 int nextIncoming
           
 SequenceNumber nextOutgoing
           
 java.lang.Object peer
           
 int peerSyn
           
 
Constructor Summary
PeerInfo(java.lang.Object peer, appia.Channel c, SequenceNumber seq)
           
 
Method Summary
 void ackSentNow()
           
 void addChannel(appia.Channel c)
           
 void confirmedUntil(int seq)
           
 appia.events.SendableEvent dequeueNextIncoming()
           
 void enqueueIncoming(appia.events.SendableEvent e, int seqNumber)
           
 void forceAck()
           
 appia.Channel getChannel()
           
 int getPendingMessages()
           
 void incIncoming()
           
 void incOutgoing()
           
 boolean isDuplicated(int check)
           
 boolean isDuplicatedSyn(int check)
           
 boolean isHisSynSent()
           
 boolean isNext(int check)
           
 boolean isOld(long now)
           
 boolean mustSendAck()
           
 boolean mustSendAck(int check)
           
 void mySynAck()
           
 void removeChannel(appia.Channel c)
           
 boolean sendMySyn()
           
 boolean sendSynAck()
           
 void synReceived(int nextIncoming)
           
 void usedNow()
           
 void windowChange(int newWindow)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextOutgoing

public SequenceNumber nextOutgoing

firstUnconfirmed

public int firstUnconfirmed

nextIncoming

public int nextIncoming

lastAckSent

public int lastAckSent

peerSyn

public int peerSyn

failed

public boolean failed

lastUsed

public long lastUsed

headers

public java.util.LinkedList headers

peer

public java.lang.Object peer
Constructor Detail

PeerInfo

public PeerInfo(java.lang.Object peer,
                appia.Channel c,
                SequenceNumber seq)
Method Detail

addChannel

public void addChannel(appia.Channel c)

removeChannel

public void removeChannel(appia.Channel c)

getChannel

public appia.Channel getChannel()

usedNow

public void usedNow()

isOld

public boolean isOld(long now)

incOutgoing

public void incOutgoing()

incIncoming

public void incIncoming()

isNext

public boolean isNext(int check)

isDuplicated

public boolean isDuplicated(int check)

isDuplicatedSyn

public boolean isDuplicatedSyn(int check)

ackSentNow

public void ackSentNow()

mustSendAck

public boolean mustSendAck(int check)

mustSendAck

public boolean mustSendAck()

dequeueNextIncoming

public appia.events.SendableEvent dequeueNextIncoming()

enqueueIncoming

public void enqueueIncoming(appia.events.SendableEvent e,
                            int seqNumber)

confirmedUntil

public void confirmedUntil(int seq)

getPendingMessages

public int getPendingMessages()

sendSynAck

public boolean sendSynAck()

sendMySyn

public boolean sendMySyn()

isHisSynSent

public boolean isHisSynSent()

synReceived

public void synReceived(int nextIncoming)

mySynAck

public void mySynAck()

forceAck

public void forceAck()

windowChange

public void windowChange(int newWindow)