public interface IQueueingStrategy
Modifier and Type | Method and Description |
---|---|
void |
activelyBalance(IResourceInstance instance)
Depending on the underlying implementation the load is balanced between
the resource instances.
|
void |
addProcess(IActiveProcess process,
IResourceInstance current,
boolean inFront)
Adds a process to the queue(s).
|
boolean |
containsPending(IActiveProcess process) |
void |
forkProcess(IActiveProcess process,
IResourceInstance current,
boolean b) |
void |
fromRunningToWaiting(IActiveProcess process) |
void |
fromWaitingToReady(IActiveProcess process,
IResourceInstance current,
boolean in_front_after_waiting) |
IActiveProcess |
getNextProcessFor(IResourceInstance instance)
Returns the next executable process for the given instance.
|
int |
getQueueLengthFor(SimResourceInstance simResourceInstance) |
List<IActiveProcess> |
getStarvingProcesses(IResourceInstance instance,
double starvationLimit) |
boolean |
isIdle(IResourceInstance instance)
True, if the given resource has no running or pending jobs, otherwise false.
|
void |
onSleep(IResourceInstance lastInstance) |
void |
registerProcess(IActiveProcess p,
IResourceInstance instance) |
boolean |
removePendingProcess(IActiveProcess process)
Removes at the pending queues of the queuing strategy and tries to remove
the process there.
|
void |
removeRunning(IActiveProcess process)
Removes a process from the running list of the instance.
|
void |
resetStarvationInfo() |
IResourceInstance |
runningOn(IActiveProcess process) |
void |
setRunningOn(IActiveProcess process,
IResourceInstance instance)
Sets the process as executing on the given instance.
|
void |
terminateProcess(IActiveProcess process) |
IActiveProcess getNextProcessFor(IResourceInstance instance)
void addProcess(IActiveProcess process, IResourceInstance current, boolean inFront)
inFront
- If true, the process is added at the beginning of its queue,
otherwise at its end.void activelyBalance(IResourceInstance instance)
instance
- Instance initiating the load balance.boolean removePendingProcess(IActiveProcess process)
process
- Process that should be removed.boolean containsPending(IActiveProcess process)
process
- Process looked for.void setRunningOn(IActiveProcess process, IResourceInstance instance)
process
- Process that shall be executed.instance
- Target instance for the process.IResourceInstance runningOn(IActiveProcess process)
process
- Process of interest.void removeRunning(IActiveProcess process)
process
- Process of interest.boolean isIdle(IResourceInstance instance)
instance
- void forkProcess(IActiveProcess process, IResourceInstance current, boolean b)
void terminateProcess(IActiveProcess process)
void fromRunningToWaiting(IActiveProcess process)
void fromWaitingToReady(IActiveProcess process, IResourceInstance current, boolean in_front_after_waiting)
void onSleep(IResourceInstance lastInstance)
void registerProcess(IActiveProcess p, IResourceInstance instance)
List<IActiveProcess> getStarvingProcesses(IResourceInstance instance, double starvationLimit)
void resetStarvationInfo()
int getQueueLengthFor(SimResourceInstance simResourceInstance)