|
GridSim 5.0 beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFnbNetPacket
public class FnbNetPacket
This class contains the structure of a packet for the purpose of finite network buffers.
In order to minimise duplications, hence, to reduce memory consumption,
common attributes to all packets have been stored in the
FnbEndToEndPath class.
The common attributes are destination ID, source ID, class type and total
number of packets.
FnbEndToEndPath| Constructor Summary | |
|---|---|
FnbNetPacket(Object data,
int pktID,
long size,
int tag,
int srcID)
Constructs a network packet for data that fits into a single network packet. |
|
FnbNetPacket(Object data,
int pktID,
long size,
int tag,
int srcID,
int pktNum)
This is used to construct a packet that is one in a series. |
|
| Method Summary | |
|---|---|
Object |
getData()
Returns the data encapsulated in this NetPacket |
int |
getDestID()
Returns the destination ID of this packet |
int |
getID()
Returns the ID of this packet |
int |
getLast()
Returns the ID of the last hop that this packet traversed. |
int |
getNetServiceType()
Returns the class type of this packet. |
int |
getObjectID()
Returns the gridlet/file to which this packet belongs |
int |
getPacketNum()
Returns the serial number of this packet. |
long |
getSize()
Gets the size of this packet |
int |
getSrcID()
Returns the source ID of this packet. |
int |
getTag()
Returns the tag associated originally with data that was encapsulated in this packet. |
int |
getTotalPackets()
Returns the total number of packets in this stream. |
boolean |
isFile()
Checks whether this packet contains a file or not |
void |
setData(Object data)
Modifies the data encapsulated in this packet. |
void |
setDestID(int id)
Sets the destination id of this packet |
void |
setLast(int last)
Sets the last hop that this NetPacket traversed. |
void |
setNetServiceType(int netServiceType)
Sets the network class type of this packet, so that it can receive differentiated services. |
void |
setPath(FnbEndToEndPath connection)
Establishes the end to end path to another entity |
boolean |
setSize(long size)
Sets the packet size |
String |
toString()
Returns a description of this packet |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FnbNetPacket(Object data,
int pktID,
long size,
int tag,
int srcID)
data - The data to be encapsulated.pktID - The ID of this packetsize - The size of the data (in bytes)tag - The original tag which was used with the data, its
reapplied when the data is extracted from the NetPacket.srcID - The id of the entity where the packet was created.
public FnbNetPacket(Object data,
int pktID,
long size,
int tag,
int srcID,
int pktNum)
data - The data to be encapsulated.pktID - The ID of this packetsize - The size of the data (in bytes)tag - The original tag which was used with the data, its
reapplied when the data is extracted from the NetPacket.srcID - The id of the entity where the packet was created.pktNum - The packet number of this packet in its series. If there
are 10 packets, they should be numbered from 1 to 10.| Method Detail |
|---|
public String toString()
toString in interface PackettoString in class Objectpublic Object getData()
public int getSrcID()
getSrcID in interface Packetpublic int getID()
getID in interface Packetpublic void setData(Object data)
data - the packet's datapublic long getSize()
getSize in interface Packetpublic boolean setSize(long size)
setSize in interface Packetsize - the packet size
public int getTag()
getTag in interface Packetpublic int getDestID()
getDestID in interface Packetpublic void setDestID(int id)
id - the destination idpublic void setLast(int last)
setLast in interface Packetlast - the entity ID from the last hoppublic int getLast()
getLast in interface Packetpublic void setNetServiceType(int netServiceType)
setNetServiceType in interface PacketnetServiceType - a network service typepublic int getNetServiceType()
getNetServiceType in interface Packetpublic int getPacketNum()
public int getTotalPackets()
public void setPath(FnbEndToEndPath connection)
connection - an end-to-end connection pathpublic int getObjectID()
public boolean isFile()
|
GridSim 5.0 beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||