public abstract class StackableQueuingDiscipline extends java.lang.Object implements QueuingDiscipline
QueuingDiscipline.QueueEntry
Modifier and Type | Field and Description |
---|---|
protected ProbabilityStatistic |
lossProbability |
protected IntegralStatistic |
numberOfMessages |
protected IntegralStatistic |
numberOfUnits |
protected SimNode |
parent |
protected SimNode |
simNode |
protected SampleStatistic |
transferTime |
protected SampleStatistic |
waitingTime |
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
StackableQueuingDiscipline(SimNode ownNode) |
StackableQueuingDiscipline(SimNode ownNode,
Parameters pars) |
Modifier and Type | Method and Description |
---|---|
QueuingDiscipline.QueueEntry |
dequeue()
Dequeue the next
QueuingDiscipline.QueueEntry according to the
QueuingDiscipline . |
QueuingDiscipline.QueueEntry |
dropScheduledNext()
This method returns the
QueuingDiscipline.QueueEntry that would be delivered next,
but accounts it as drop. |
protected void |
enqueue(Message msg) |
int |
getCurrentNumberOfMessages() |
long |
getCurrentNumberOfUnits() |
abstract int |
getMaxSizeInUnits() |
java.lang.String |
getName() |
SimNode |
getNode() |
SimNode |
getParent() |
protected void |
handleLossMessage(QueuingDiscipline.QueueEntry qe) |
boolean |
handleMessage(Message msg)
Request the
QueuingDiscipline to handle the Message . |
protected void |
handleRejectedMessage(QueuingDiscipline.QueueEntry qe) |
boolean |
hasSpaceFor(Message msg)
A simple method to check for "physical" space.
|
abstract boolean |
isEmpty() |
protected abstract QueuingDiscipline.QueueEntry |
peek()
Retrieve the QueueEntry that would be delivered next, without actually
removing it.
|
protected abstract QueuingDiscipline.QueueEntry |
pop()
Retrieve and remove the next QueueEntry according to the queuing
discipline.
|
protected abstract void |
push(QueuingDiscipline.QueueEntry qe)
Push message into the data structure managed by the queuing discipline.
|
protected void |
statsUpdateDequeue(QueuingDiscipline.QueueEntry qe) |
protected void |
statsUpdateEnqueue(QueuingDiscipline.QueueEntry qe) |
protected void |
statsUpdateLoss(QueuingDiscipline.QueueEntry qe) |
protected void |
statsUpdateReject(QueuingDiscipline.QueueEntry qe) |
boolean |
wouldStore(Message msg) |
protected final SimNode simNode
protected final SimNode parent
protected final SampleStatistic waitingTime
protected final SampleStatistic transferTime
protected final IntegralStatistic numberOfUnits
protected final ProbabilityStatistic lossProbability
protected final IntegralStatistic numberOfMessages
public StackableQueuingDiscipline(SimNode ownNode, Parameters pars)
public StackableQueuingDiscipline(SimNode ownNode)
public abstract int getMaxSizeInUnits()
getMaxSizeInUnits
in interface QueuingDiscipline
public java.lang.String getName()
getName
in interface QueuingDiscipline
public SimNode getNode()
getNode
in interface QueuingDiscipline
public SimNode getParent()
getParent
in interface QueuingDiscipline
public abstract boolean isEmpty()
isEmpty
in interface QueuingDiscipline
public boolean wouldStore(Message msg)
wouldStore
in interface QueuingDiscipline
ProbabilisticQeuingDiscipline
s. For these, two subsequent
calls with the same message may return different results!public boolean hasSpaceFor(Message msg)
msg
- QueuingDiscipline
has space for that message.public final int getCurrentNumberOfMessages()
getCurrentNumberOfMessages
in interface QueuingDiscipline
public final long getCurrentNumberOfUnits()
getCurrentNumberOfUnits
in interface QueuingDiscipline
public QueuingDiscipline.QueueEntry dequeue()
QueuingDiscipline
QueuingDiscipline.QueueEntry
according to the
QueuingDiscipline
. This will be accounted for as successful
forwarding.dequeue
in interface QueuingDiscipline
QueuingDiscipline.QueueEntry
public boolean handleMessage(Message msg)
QueuingDiscipline
QueuingDiscipline
to handle the Message
. This
can either store it, then it returns true, or drop it, then it return
false. If it drops it, this drop will be accounted for (as drop with 0
waiting time).handleMessage
in interface QueuingDiscipline
public QueuingDiscipline.QueueEntry dropScheduledNext()
QueuingDiscipline
QueuingDiscipline.QueueEntry
that would be delivered next,
but accounts it as drop.dropScheduledNext
in interface QueuingDiscipline
QueuingDiscipline.QueueEntry
protected void enqueue(Message msg)
protected void handleRejectedMessage(QueuingDiscipline.QueueEntry qe)
protected void handleLossMessage(QueuingDiscipline.QueueEntry qe)
protected void statsUpdateEnqueue(QueuingDiscipline.QueueEntry qe)
protected void statsUpdateReject(QueuingDiscipline.QueueEntry qe)
protected void statsUpdateLoss(QueuingDiscipline.QueueEntry qe)
protected void statsUpdateDequeue(QueuingDiscipline.QueueEntry qe)
protected abstract void push(QueuingDiscipline.QueueEntry qe)
msg
- protected abstract QueuingDiscipline.QueueEntry peek()
protected abstract QueuingDiscipline.QueueEntry pop()