public class GlobalTaskPoolScheduling extends Object implements TeeTimeScheduler, PipeScheduler, Thread.UncaughtExceptionHandler
| Constructor and Description |
|---|
GlobalTaskPoolScheduling(int numThreads,
Configuration configuration)
A thread executes a stage x per job.
|
GlobalTaskPoolScheduling(int numThreads,
Configuration configuration,
int numOfExecutions) |
| Modifier and Type | Method and Description |
|---|---|
List<AbstractStage> |
getFiniteProducerStages() |
Set<AbstractStage> |
getFrontStages() |
teetime.framework.scheduling.globaltaskpool.TeeTimeTaskQueueThreadChw |
getOwningThreadSynched(AbstractStage stage) |
teetime.framework.scheduling.globaltaskpool.PrioritizedTaskPool |
getPrioritizedTaskPool() |
boolean |
isBeingExecuted(AbstractStage stage) |
boolean |
isPausedStage(AbstractStage stage) |
void |
onElementAdded(AbstractSynchedPipe<?> pipe)
This event is invoked by the given synchronized pipe whenever a new element was added to it.
|
void |
onElementAdded(AbstractUnsynchedPipe<?> pipe)
This event is invoked by the given unsynchronized pipe whenever a new element was added to it.
|
void |
onElementNotAdded(AbstractSynchedPipe<?> pipe)
This event is invoked by the given synchronized pipe whenever a new element could not be added to it.
|
void |
onExecute()
Executes the execution.
|
void |
onFinish()
Waits for the execution to finished.
|
void |
onInitialize() |
void |
onTerminate()
Aborts the execution.
|
void |
onValidate() |
boolean |
setIsBeingExecuted(AbstractStage stage,
boolean newValue) |
void |
setOwningThreadSynced(AbstractStage stage,
teetime.framework.scheduling.globaltaskpool.TeeTimeTaskQueueThreadChw newThread) |
void |
startStageAtRuntime(AbstractStage stage) |
String |
toString() |
void |
uncaughtException(Thread thread,
Throwable throwable) |
public GlobalTaskPoolScheduling(int numThreads,
Configuration configuration)
numThreads - configuration - public GlobalTaskPoolScheduling(int numThreads,
Configuration configuration,
int numOfExecutions)
numThreads - the number of threads to use for executing the given P&F configurationconfiguration - the configuration to execute/schedulenumOfExecutions - the number of execution per scheduled stage (task) for a thread. Is rounded up to the next power of 2, i.e., 1,2,4,16,...public void onInitialize()
onInitialize in interface TeeTimeSchedulerpublic void onValidate()
onValidate in interface TeeTimeSchedulerpublic void onExecute()
TeeTimeScheduleronExecute in interface TeeTimeSchedulerpublic void onTerminate()
TeeTimeScheduleronTerminate in interface TeeTimeSchedulerpublic void onFinish()
TeeTimeScheduleronFinish in interface TeeTimeSchedulerpublic void startStageAtRuntime(AbstractStage stage)
startStageAtRuntime in interface TeeTimeSchedulerpublic List<AbstractStage> getFiniteProducerStages()
public Set<AbstractStage> getFrontStages()
public teetime.framework.scheduling.globaltaskpool.PrioritizedTaskPool getPrioritizedTaskPool()
public void onElementAdded(AbstractUnsynchedPipe<?> pipe)
PipeScheduleronElementAdded in interface PipeSchedulerpublic void onElementAdded(AbstractSynchedPipe<?> pipe)
PipeScheduleronElementAdded in interface PipeSchedulerpublic void onElementNotAdded(AbstractSynchedPipe<?> pipe)
PipeScheduleronElementNotAdded in interface PipeSchedulerpublic boolean isPausedStage(AbstractStage stage)
public boolean isBeingExecuted(AbstractStage stage)
public boolean setIsBeingExecuted(AbstractStage stage, boolean newValue)
public void setOwningThreadSynced(AbstractStage stage, teetime.framework.scheduling.globaltaskpool.TeeTimeTaskQueueThreadChw newThread)
public teetime.framework.scheduling.globaltaskpool.TeeTimeTaskQueueThreadChw getOwningThreadSynched(AbstractStage stage)
public void uncaughtException(Thread thread, Throwable throwable)
uncaughtException in interface Thread.UncaughtExceptionHandlerCopyright © 2015–2020. All rights reserved.