|
GridSim v3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectgridsim.net.PacketScheduler
gridsim.net.FIFOScheduler
FIFOScheduler implements a First in First Out Scheduler. This means that all the packets are enqued at the tail of a queue, and packets depart from the head of the queue. Packets are not reordered, and no differentiated service will be provided.
Constructor Summary | |
FIFOScheduler()
Creates a new packet scheduler with the name "FIFOScheduler". |
|
FIFOScheduler(double baudRate)
Creates a new FIFO packet scheduler with the specified baud rate (bits/s). |
|
FIFOScheduler(String name)
Creates a new FIFO packet scheduler with the specified name. |
|
FIFOScheduler(String name,
double baudRate)
Creates a new FIFO packet scheduler with the specified name and baud rate (in bits/s). |
Method Summary | |
Packet |
deque()
In this scheduler, the packet returned is always from the head of the queue. |
boolean |
enque(Packet np)
In this scheduler, the packet is put into the tail of the queue. |
boolean |
isEmpty()
Determines whether the scheduler is currently keeping any packets in its queue(s). |
int |
size()
Determines the number of packets that are currently enqueued in this scheduler. |
Methods inherited from class gridsim.net.PacketScheduler |
getBaudRate, getName, setBaudRate |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FIFOScheduler(String name, double baudRate) throws ParameterException
name
- Name of this schedulerbaudRate
- baud rate in bits/s of the port that is using
this scheduler.
ParameterException
- This happens when the name is null or
the baud rate <= 0public FIFOScheduler(double baudRate) throws ParameterException
baudRate
- baud rate in bits/s of the port that is using
this scheduler.
ParameterException
- This happens when the baud rate <= 0public FIFOScheduler(String name) throws ParameterException
PacketScheduler.setBaudRate(double)
before being the simulation is started.
name
- Name of this scheduler
ParameterException
- This happens when the name is nullPacketScheduler.setBaudRate(double)
public FIFOScheduler() throws ParameterException
PacketScheduler.setBaudRate(double)
before being the simulation is started.
ParameterException
- This happens when the name is nullPacketScheduler.setBaudRate(double)
Method Detail |
public boolean enque(Packet np)
enque
in class PacketScheduler
np
- A Packet to be enqued by this scheduler.
public Packet deque()
deque
in class PacketScheduler
public boolean isEmpty()
isEmpty
in class PacketScheduler
public int size()
size
in class PacketScheduler
|
GridSim v3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |