|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFairness.Nodes.NodePacket
public class NodePacket
NodePacket represents packets in the fairness simulation. It is intended that NodePackets are always routed and passed to children nodes even if in the simulated network they are not "sent" at all or even "lost". This is the reason for the existance of the lost and send flags. If a NodePacket arrives successfully at its destination it is considered to be a live packet.
Constructor Summary | |
---|---|
NodePacket(Node source,
int stripeId,
boolean lost,
boolean sent,
int size)
Constructs a new NodePacket |
Method Summary | |
---|---|
int |
getSize()
Returns this packet's size in bytes. |
Node |
getSource()
Returns the source of this packet, or null if the source is the publisher. |
int |
getStripeId()
Returns the stripe ID for this packet |
boolean |
isLive()
Returns true if this packet was not lost and was sent. |
boolean |
isLost()
Returns true if this packet is being simulated as a lost packet. |
boolean |
isSent()
Returns true if this packet is being simulated as having been purposefully sent by the source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodePacket(Node source, int stripeId, boolean lost, boolean sent, int size)
source
- nullable Node as source. null means the publisher is the sourcestripeId
- stripe ID for the data in this packetlost
- true if packet has been lost due to network errorssent
- true if the source chose to send the packet purposefullysize
- size of the packet in bytesMethod Detail |
---|
public Node getSource()
public int getStripeId()
public boolean isLost()
public boolean isSent()
public int getSize()
public boolean isLive()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |