|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SynchronizerCore
The core synchronizer allows to run a list of given ConditionalTask at a given rate.
| Field Summary |
|---|
| Fields inherited from interface barsuift.simLife.process.Synchronizer |
|---|
CYCLE_LENGTH_3D_MS, CYCLE_LENGTH_CORE_MS |
| Method Summary | |
|---|---|
Speed |
getSpeed()
Returns the speed of the core synchronizer. |
void |
schedule(ConditionalTask task)
Adds the given task to the list of synchronized tasks. |
void |
setBarrier(java.util.concurrent.CyclicBarrier barrier)
Set the barrier to use for synchronization purpose. |
void |
setSpeed(Speed speed)
Sets the speed of the current core synchronizer. |
void |
unschedule(ConditionalTask task)
Remove the given task from the list of synchronized tasks. |
| Methods inherited from interface barsuift.simLife.process.Synchronizer |
|---|
isRunning, start, stop |
| Methods inherited from interface barsuift.simLife.message.Publisher |
|---|
addSubscriber, clearChanged, countSubscribers, deleteSubscriber, deleteSubscribers, hasChanged, notifySubscribers, notifySubscribers, setChanged |
| Methods inherited from interface barsuift.simLife.message.Subscriber |
|---|
update |
| Methods inherited from interface barsuift.simLife.Persistent |
|---|
getState, synchronize |
| Method Detail |
|---|
void setSpeed(Speed speed)
speed - the speedSpeed getSpeed()
void schedule(ConditionalTask task)
schedule in interface TaskSynchronizer<ConditionalTask>task - the task to synchronizevoid unschedule(ConditionalTask task)
unschedule in interface TaskSynchronizer<ConditionalTask>task - the task to desynchronizevoid setBarrier(java.util.concurrent.CyclicBarrier barrier)
barrier - the cyclic barrier used to synchronize the synchronizer with other synchronizers
java.lang.IllegalArgumentException - if the given barrier is null
java.lang.IllegalStateException - if a barrier has already been set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||