Package unicamp.ic.lrc.sinergycloud.core
Class ConnectionPacketLevel
- java.lang.Object
-
- unicamp.ic.lrc.sinergycloud.core.Connection
-
- unicamp.ic.lrc.sinergycloud.core.ConnectionPacketLevel
-
public class ConnectionPacketLevel extends Connection
Connection class - used to transfer data trough packets like TCP/IP structure
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class unicamp.ic.lrc.sinergycloud.core.Connection
Connection.Engine
-
-
Constructor Summary
Constructors Constructor Description ConnectionPacketLevel(EndSystem source, EndSystem destination, long dataToTransfer, Event eventOnFinish)Connection create
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<Packet>getAllPacketsInTransit()static intgetNumAllPacketsInTransit()longgetNumPacketsWaitingQueue()java.util.List<Packet>getPacketsInTransit()booleanisAllPacketsDelivered()static voidupdateConnections()Move the packets that can be moved-
Methods inherited from class unicamp.ic.lrc.sinergycloud.core.Connection
create, getConnections, getDestination, getEngine, getEventOnFinish, getSource, toString
-
-
-
-
Constructor Detail
-
ConnectionPacketLevel
public ConnectionPacketLevel(EndSystem source, EndSystem destination, long dataToTransfer, Event eventOnFinish)
Connection create- Parameters:
source- the source end systemdestination- the destination end systemdataToTransfer- the amount of data to transfer (in bytes)eventOnFinish- the event to be executed after the connection finalization
-
-
Method Detail
-
getNumPacketsWaitingQueue
public long getNumPacketsWaitingQueue()
- Returns:
- the numPacketsWaitingQueue
-
getPacketsInTransit
public java.util.List<Packet> getPacketsInTransit()
- Returns:
- the packetsInTransit
-
isAllPacketsDelivered
public boolean isAllPacketsDelivered()
- Returns:
- true if all packets from this connection where delivered
-
getAllPacketsInTransit
public static java.util.List<Packet> getAllPacketsInTransit()
- Returns:
- a list of packets in transit for the current simulation
-
getNumAllPacketsInTransit
public static int getNumAllPacketsInTransit()
- Returns:
- the number of packets in transit
-
updateConnections
public static void updateConnections()
Move the packets that can be moved
-
-