Class RoundBasedExecutor
- java.lang.Object
- 
- jadex.commons.SimplePropertyObject
- 
- jadex.extension.envsupport.environment.RoundBasedExecutor
 
 
- 
- All Implemented Interfaces:
- IPropertyObject,- ISpaceExecutor
 
 public class RoundBasedExecutor extends SimplePropertyObject implements ISpaceExecutor Synchronized execution of all actions in rounds based on clock ticks.
- 
- 
Field SummaryFields Modifier and Type Field Description protected longcurrenttimeCurrent time.static java.lang.StringMODE_LASTACTIONThe value for the last action execution mode.static java.lang.StringPROPERTY_MODEThe property for the action execution mode.protected booleanterminatedThe flag indicating that the executor is terminated.protected ITimertimerThe tick timer.protected longtimestampLast time stamp.- 
Fields inherited from class jadex.commons.SimplePropertyObjectpcs, properties
 - 
Fields inherited from interface jadex.extension.envsupport.environment.ISpaceExecutorPROPERTY_EXECUTION_MONITORING
 
- 
 - 
Constructor SummaryConstructors Constructor Description RoundBasedExecutor()Creates a new round based executor.RoundBasedExecutor(AbstractEnvironmentSpace space)Creates a new round based executor.RoundBasedExecutor(AbstractEnvironmentSpace space, java.util.Comparator acomp)Creates a new round based executor.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidmonitorExecution(IExternalAccess ea, IExecutionService exe)Check if no agent is running whenever the clock advances.voidstart()Start the space executor.voidterminate()Terminate the space executor.- 
Methods inherited from class jadex.commons.SimplePropertyObjectaddPropertyChangeListener, getProperties, getProperty, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty, toString
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface jadex.commons.IPropertyObjectgetProperty, getPropertyNames, hasProperty, setProperty
 
- 
 
- 
- 
- 
Field Detail- 
PROPERTY_MODEpublic static final java.lang.String PROPERTY_MODE The property for the action execution mode.- See Also:
- Constant Field Values
 
 - 
MODE_LASTACTIONpublic static final java.lang.String MODE_LASTACTION The value for the last action execution mode.- See Also:
- Constant Field Values
 
 - 
timestampprotected long timestamp Last time stamp.
 - 
currenttimeprotected long currenttime Current time.
 - 
timerprotected ITimer timer The tick timer.
 - 
terminatedprotected boolean terminated The flag indicating that the executor is terminated.
 
- 
 - 
Constructor Detail- 
RoundBasedExecutorpublic RoundBasedExecutor() Creates a new round based executor.
 - 
RoundBasedExecutorpublic RoundBasedExecutor(AbstractEnvironmentSpace space) Creates a new round based executor.- Parameters:
- space- The space.
- clockservice- The clock service.
 
 - 
RoundBasedExecutorpublic RoundBasedExecutor(AbstractEnvironmentSpace space, java.util.Comparator acomp) Creates a new round based executor.- Parameters:
- space- The space.
- clockservice- The clock service.
- acomp- The action comparator.
 
 
- 
 - 
Method Detail- 
startpublic void start() Start the space executor.- Specified by:
- startin interface- ISpaceExecutor
 
 - 
terminatepublic void terminate() Terminate the space executor.- Specified by:
- terminatein interface- ISpaceExecutor
 
 - 
monitorExecutionprotected static void monitorExecution(IExternalAccess ea, IExecutionService exe) Check if no agent is running whenever the clock advances.
 
- 
 
-