public class

MultiThreadedSchedule

extends Object
implements ScheduleExecutor
java.lang.Object
   ↳ uk.ac.imperial.presage2.core.simulator.MultiThreadedSchedule

Summary

Public Methods
int getThreadCount()
Get number of threads in use by this executor.
void shutdown()
Shutdown executor.
void submit(Runnable s)
Submit a task with no completion condition to wait for.
void submitScheduled(Runnable s, ScheduleExecutor.WaitCondition condition)
Submit a task with specified ScheduleExecutor.WaitCondition.
Future<Boolean> submitScheduledConditional(Callable<Boolean> s, ScheduleExecutor.WaitCondition condition)
Submit a conditional task and receive a Future representing its future return value.
void waitFor(ScheduleExecutor.WaitCondition condition)
Wait for all scheduled tasks for the specified ScheduleExecutor.WaitCondition to complete.
[Expand]
Inherited Methods
From class java.lang.Object
From interface uk.ac.imperial.presage2.core.simulator.ScheduleExecutor

Public Methods

public int getThreadCount ()

Get number of threads in use by this executor.

public void shutdown ()

Shutdown executor.

public void submit (Runnable s)

Submit a task with no completion condition to wait for.

public void submitScheduled (Runnable s, ScheduleExecutor.WaitCondition condition)

Submit a task with specified ScheduleExecutor.WaitCondition.

Parameters
s Runnable task

public Future<Boolean> submitScheduledConditional (Callable<Boolean> s, ScheduleExecutor.WaitCondition condition)

Submit a conditional task and receive a Future representing its future return value.

Parameters
s Callable task, returning a boolean.
Returns
  • Future for this task.

public void waitFor (ScheduleExecutor.WaitCondition condition)

Wait for all scheduled tasks for the specified ScheduleExecutor.WaitCondition to complete.