|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rice.pastry.wire.DatagramTransmissionManager
Class which controls which object should be transmitted in the UPD version of the pastry protocol. This class is responsible for ensuring reliable and ordered delivery of packets to their destinations. This implementation is thread-safe, so both the client and pastry thread can access it at once.
Field Summary | |
static int |
BEGIN_ACK_NUM
|
Constructor Summary | |
DatagramTransmissionManager(rice.pastry.wire.WirePastryNode spn,
java.nio.channels.SelectionKey key)
Builds a transmission manager for a given pastry node using a given key. |
Method Summary | |
void |
add(rice.pastry.wire.PendingWrite write)
Adds a pending write to the queue. |
java.util.Iterator |
getReady()
Returns an iterator over the pending writes ready to be written. |
void |
receivedAck(rice.pastry.wire.messaging.datagram.AcknowledgementMessage message)
Callback mechanism designed to be called when an ack packet is received. |
void |
resetAckNumber(rice.pastry.NodeId node)
Resets the sequence number for the specified node |
void |
wakeup()
Designed to be called periodically in order for the Transmission Manager to decide if a packet has been lost. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int BEGIN_ACK_NUM
Constructor Detail |
public DatagramTransmissionManager(rice.pastry.wire.WirePastryNode spn, java.nio.channels.SelectionKey key)
spn
- The pastry node this manager serves.key
- The key used by the datagram manager.Method Detail |
public void add(rice.pastry.wire.PendingWrite write)
write
- The pending write to add.public java.util.Iterator getReady()
public void receivedAck(rice.pastry.wire.messaging.datagram.AcknowledgementMessage message)
public void wakeup()
public void resetAckNumber(rice.pastry.NodeId node)
node
- The node to reset
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |