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 Summary
Fields Modifier and Type Field Description protected long
currenttime
Current time.static java.lang.String
MODE_LASTACTION
The value for the last action execution mode.static java.lang.String
PROPERTY_MODE
The property for the action execution mode.protected boolean
terminated
The flag indicating that the executor is terminated.protected ITimer
timer
The tick timer.protected long
timestamp
Last time stamp.-
Fields inherited from class jadex.commons.SimplePropertyObject
pcs, properties
-
Fields inherited from interface jadex.extension.envsupport.environment.ISpaceExecutor
PROPERTY_EXECUTION_MONITORING
-
-
Constructor Summary
Constructors 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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
monitorExecution(IExternalAccess ea, IExecutionService exe)
Check if no agent is running whenever the clock advances.void
start()
Start the space executor.void
terminate()
Terminate the space executor.-
Methods inherited from class jadex.commons.SimplePropertyObject
addPropertyChangeListener, getProperties, getProperty, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jadex.commons.IPropertyObject
getProperty, getPropertyNames, hasProperty, setProperty
-
-
-
-
Field Detail
-
PROPERTY_MODE
public static final java.lang.String PROPERTY_MODE
The property for the action execution mode.- See Also:
- Constant Field Values
-
MODE_LASTACTION
public static final java.lang.String MODE_LASTACTION
The value for the last action execution mode.- See Also:
- Constant Field Values
-
timestamp
protected long timestamp
Last time stamp.
-
currenttime
protected long currenttime
Current time.
-
timer
protected ITimer timer
The tick timer.
-
terminated
protected boolean terminated
The flag indicating that the executor is terminated.
-
-
Constructor Detail
-
RoundBasedExecutor
public RoundBasedExecutor()
Creates a new round based executor.
-
RoundBasedExecutor
public RoundBasedExecutor(AbstractEnvironmentSpace space)
Creates a new round based executor.- Parameters:
space
- The space.clockservice
- The clock service.
-
RoundBasedExecutor
public 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
-
start
public void start()
Start the space executor.- Specified by:
start
in interfaceISpaceExecutor
-
terminate
public void terminate()
Terminate the space executor.- Specified by:
terminate
in interfaceISpaceExecutor
-
monitorExecution
protected static void monitorExecution(IExternalAccess ea, IExecutionService exe)
Check if no agent is running whenever the clock advances.
-
-