public class MultiPhasePrioServer extends Entity
MultiPhasePrioServer
provides a priority server component with
an arbitrary number of phases. A phase can be created by the method
CreatePhase
. The overall preemption behaviour can be defined by
the preemption distance. A phase can be interrupted by another phase if the
difference of the priorities is greater than the preemption distance.
Each phase has its own name, priority, service time distribution, queueing
strategy and preemption strategy. A phase is realized by the class
ServerPhase
.
All phases with the same priority share a common object of class
ServerPriorityQueue
which is automatically created by
MultiPhasePrioServer
.
Modifier and Type | Class and Description |
---|---|
protected static class |
MultiPhasePrioServer.State |
Entity.PortAlias
Modifier and Type | Field and Description |
---|---|
protected ServerJob |
currentJob |
protected int |
currentQueueLength |
protected double |
entryTime |
protected Event |
event |
protected IntegralStatistic |
occupancy |
protected java.util.Map<java.lang.String,ServerPhase> |
phaseMap |
protected int |
preemptionDistance |
protected java.util.List<ServerPriorityQueue> |
priorityQueueList |
protected IntegralStatistic |
queueLength |
protected MultiPhasePrioServer.State |
state |
protected SampleStatistic |
transferTime |
protected SampleStatistic |
waitingTime |
portAliases, ports, simNode
Constructor and Description |
---|
MultiPhasePrioServer(int preemptionDistance,
SimNode ownNode) |
Modifier and Type | Method and Description |
---|---|
protected void |
addPhase(ServerPhase phase) |
void |
createPhase(java.lang.String phaseName,
ContinuousDistribution serviceTime) |
void |
createPhase(java.lang.String phaseName,
ContinuousDistribution serviceTime,
int priority) |
void |
createPhase(java.lang.String phaseName,
ContinuousDistribution serviceTime,
int priority,
PreemptionStrategy preemptionStrategy) |
void |
createPhase(java.lang.String phaseName,
ContinuousDistribution serviceTime,
int priority,
PreemptionStrategy preemptionStrategy,
QueueingStrategy queueingStrategy) |
void |
deletePhase(java.lang.String phaseName) |
protected ServerJob |
get() |
int |
getNoOfPhases() |
protected SynchronousOutputPort |
getOutputPort(ServerJob job) |
ServerPriorityQueue |
getPriorityQueue(int priority) |
void |
handleProcessEvent(double eventTime) |
protected void |
interrupt(ServerJob job) |
void |
put(Message msg,
ServerPhase phase) |
protected void |
removePhase(ServerPhase phase) |
protected void |
run(ServerJob job) |
protected void |
updateStatisticsAtEndOfService(ServerJob job,
double currentTime) |
protected void |
updateStatisticsAtGet(ServerJob job,
double currentTime) |
protected void |
updateStatisticsAtInterrupt(ServerJob job,
double currentTime) |
protected void |
updateStatisticsAtPut(ServerJob job,
double currentTime) |
protected void |
updateStatisticsAtRun(ServerJob job,
double currentTime) |
addPort, aliasPort, aliasPort, connect, disconnect, getName, getNode, getPortByName, getPorts, isPortKnown, unaliasPort
protected final Event event
protected final int preemptionDistance
protected final java.util.Map<java.lang.String,ServerPhase> phaseMap
protected final java.util.List<ServerPriorityQueue> priorityQueueList
protected MultiPhasePrioServer.State state
protected ServerJob currentJob
protected double entryTime
protected int currentQueueLength
protected final IntegralStatistic occupancy
protected final IntegralStatistic queueLength
protected final SampleStatistic transferTime
protected final SampleStatistic waitingTime
public MultiPhasePrioServer(int preemptionDistance, SimNode ownNode)
protected void addPhase(ServerPhase phase)
protected void removePhase(ServerPhase phase)
protected SynchronousOutputPort getOutputPort(ServerJob job)
protected ServerJob get()
protected void run(ServerJob job)
protected void interrupt(ServerJob job)
protected void updateStatisticsAtPut(ServerJob job, double currentTime)
protected void updateStatisticsAtGet(ServerJob job, double currentTime)
protected void updateStatisticsAtRun(ServerJob job, double currentTime)
protected void updateStatisticsAtInterrupt(ServerJob job, double currentTime)
protected void updateStatisticsAtEndOfService(ServerJob job, double currentTime)
public void createPhase(java.lang.String phaseName, ContinuousDistribution serviceTime, int priority, PreemptionStrategy preemptionStrategy, QueueingStrategy queueingStrategy)
public final void createPhase(java.lang.String phaseName, ContinuousDistribution serviceTime, int priority, PreemptionStrategy preemptionStrategy)
public final void createPhase(java.lang.String phaseName, ContinuousDistribution serviceTime, int priority)
public final void createPhase(java.lang.String phaseName, ContinuousDistribution serviceTime)
public void deletePhase(java.lang.String phaseName)
public int getNoOfPhases()
public void put(Message msg, ServerPhase phase)
public ServerPriorityQueue getPriorityQueue(int priority)
public void handleProcessEvent(double eventTime)