|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object Thread Sim_entity FnbSCFQScheduler FIFO
public class FIFO
This class implements the FIFO policy for the management of network buffers at routers. Its basic functionality is as follows:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
FIFO(String name,
double baudRate,
int max_buf_size,
double queue_weight,
boolean stats)
Creates a new FIFO policy with the specified name and baud rate (in bits/sec). |
Method Summary | |
---|---|
double |
avgQueueSize()
Calculate the avg queue size for the FIFO algorithm. |
boolean |
enque(Packet pnp)
Checks queue size and puts a packet into the queue |
double |
getAvg()
Returns the avg buffer size |
protected void |
initialize()
This function initializes the parameters of FIFO policy |
boolean |
setBaudRate(double rate)
Sets the baud rate that this scheduler will be sending packets at. |
void |
updateStats()
Update the statistics of this scheduler to a file. |
Methods inherited from class Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FIFO(String name, double baudRate, int max_buf_size, double queue_weight, boolean stats) throws Exception
name
- Name of this schedulerbaudRate
- baud rate in bits/s of the port that is using
this scheduler.max_buf_size
- maximum buffer size for routersqueue_weight
- this parameter reflects how important is the laststats
- whether we want to store stats or not
Exception
- This happens when the name is null or
the baud rate <= 0Method Detail |
---|
public boolean enque(Packet pnp)
enque
in interface PacketScheduler
enque
in class FnbSCFQScheduler
pnp
- A Packet to be enqued by this scheduler.
public double avgQueueSize()
protected void initialize()
initialize
in class FnbSCFQScheduler
public boolean setBaudRate(double rate)
rate
- the baud rate of this scheduler (in bits/s)
public double getAvg()
getAvg
in class FnbSCFQScheduler
public void updateStats()
updateStats
in class FnbSCFQScheduler
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |