public abstract class FairQueuing extends StackableQueuingDiscipline
MessageClassificator
.
Fair queuing involves two tasks:
Modifier and Type | Class and Description |
---|---|
class |
FairQueuing.SortableQDiscContainer |
QueuingDiscipline.QueueEntry
Modifier and Type | Field and Description |
---|---|
protected FairQueuing.SortableQDiscContainer |
activeQ |
protected java.util.TreeMap<java.lang.Long,java.util.LinkedList<FairQueuing.SortableQDiscContainer>> |
longestQList |
protected int |
maxSizeInUnits |
protected MessageClassificator<?,FairQueuing.SortableQDiscContainer> |
queues |
lossProbability, numberOfMessages, numberOfUnits, parent, simNode, transferTime, waitingTime
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
FairQueuing(SimNode ownNode,
Parameters pars) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
activeQListIsEmpty() |
protected abstract void |
addToActiveQList(FairQueuing.SortableQDiscContainer sq) |
protected abstract void |
advanceActiveQ() |
protected void |
bufferStealing()
Discard if necessary to obey the maximum size.
|
abstract FairQueuing.SortableQDiscContainer |
createSortableQDisc(StackableQueuingDiscipline q) |
int |
getMaxSizeInUnits() |
boolean |
isEmpty() |
protected QueuingDiscipline.QueueEntry |
peekInternal() |
protected QueuingDiscipline.QueueEntry |
pop()
Retrieve and remove the next QueueEntry according to the queuing
discipline.
|
protected void |
push(QueuingDiscipline.QueueEntry qe)
Push message into the data structure managed by the queuing discipline.
|
protected abstract void |
updateActiveQList(FairQueuing.SortableQDiscContainer sq,
double oldPos) |
protected void |
updateLongestQList(FairQueuing.SortableQDiscContainer sq,
long oldLength) |
abstract boolean |
wouldStore(Message msg) |
dequeue, dropScheduledNext, enqueue, getCurrentNumberOfMessages, getCurrentNumberOfUnits, getName, getNode, getParent, handleLossMessage, handleLossMessageInternal, handleMessage, handleRejectedMessage, hasSpaceFor, peek, statsUpdateDequeue, statsUpdateEnqueue, statsUpdateLoss, statsUpdateReject
protected MessageClassificator<?,FairQueuing.SortableQDiscContainer> queues
protected java.util.TreeMap<java.lang.Long,java.util.LinkedList<FairQueuing.SortableQDiscContainer>> longestQList
protected FairQueuing.SortableQDiscContainer activeQ
protected int maxSizeInUnits
public FairQueuing(SimNode ownNode, Parameters pars)
public abstract boolean wouldStore(Message msg)
wouldStore
in interface QueuingDiscipline
wouldStore
in class StackableQueuingDiscipline
ProbabilisticQueuingDiscipline
s. For these, two subsequent
calls with the same message may return different results!public abstract FairQueuing.SortableQDiscContainer createSortableQDisc(StackableQueuingDiscipline q)
protected abstract boolean activeQListIsEmpty()
protected abstract void addToActiveQList(FairQueuing.SortableQDiscContainer sq)
protected abstract void updateActiveQList(FairQueuing.SortableQDiscContainer sq, double oldPos)
protected abstract void advanceActiveQ()
protected void updateLongestQList(FairQueuing.SortableQDiscContainer sq, long oldLength)
public int getMaxSizeInUnits()
getMaxSizeInUnits
in interface QueuingDiscipline
getMaxSizeInUnits
in class StackableQueuingDiscipline
public boolean isEmpty()
isEmpty
in interface QueuingDiscipline
isEmpty
in class StackableQueuingDiscipline
protected void push(QueuingDiscipline.QueueEntry qe)
StackableQueuingDiscipline
push
in class StackableQueuingDiscipline
protected void bufferStealing()
protected QueuingDiscipline.QueueEntry peekInternal()
peekInternal
in class StackableQueuingDiscipline
protected QueuingDiscipline.QueueEntry pop()
StackableQueuingDiscipline
pop
in class StackableQueuingDiscipline