Class ApplicationExecutor
- java.lang.Object
-
- io.ciera.runtime.summit.application.ApplicationExecutor
-
- All Implemented Interfaces:
IRunContext,Runnable
public class ApplicationExecutor extends Object implements Runnable, IRunContext
-
-
Constructor Summary
Constructors Constructor Description ApplicationExecutor(String name)ApplicationExecutor(String name, String[] args)ApplicationExecutor(String name, String[] args, ILogger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChange(IModelDelta delta)TimerHandleaddTimer(Timer timer)String[]args()booleancancelTimer(TimerHandle t)voidderegisterEvent(EventHandle e)voidenableSimulatedTime(boolean enable)voidexecute(IApplicationTask task)EventSetgetActiveEvents()TimerSetgetActiveTimers()IChangeLoggetChangeLog()InstantgetEpoch()IEventgetEvent(EventHandle e)IExceptionHandlergetExceptionHandler()ILoggergetLog()StringgetName()TimergetTimer(TimerHandle t)IChangeLogheartbeat()IChangeLogperformTransaction(IApplicationTask task)voidregisterEvent(IEvent event)voidrun()voidsetEpoch(Instant newEpoch)voidsetExceptionHandler(IExceptionHandler h)voidsetTime(long time)voidstart()longtime()
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceIRunContext
-
execute
public void execute(IApplicationTask task)
- Specified by:
executein interfaceIRunContext
-
heartbeat
public IChangeLog heartbeat()
- Specified by:
heartbeatin interfaceIRunContext
-
performTransaction
public IChangeLog performTransaction(IApplicationTask task)
- Specified by:
performTransactionin interfaceIRunContext
-
getExceptionHandler
public IExceptionHandler getExceptionHandler()
- Specified by:
getExceptionHandlerin interfaceIRunContext
-
setExceptionHandler
public void setExceptionHandler(IExceptionHandler h)
- Specified by:
setExceptionHandlerin interfaceIRunContext
-
args
public String[] args()
- Specified by:
argsin interfaceIRunContext
-
addTimer
public TimerHandle addTimer(Timer timer)
- Specified by:
addTimerin interfaceIRunContext
-
cancelTimer
public boolean cancelTimer(TimerHandle t)
- Specified by:
cancelTimerin interfaceIRunContext
-
time
public long time()
- Specified by:
timein interfaceIRunContext
-
setTime
public void setTime(long time)
- Specified by:
setTimein interfaceIRunContext
-
setEpoch
public void setEpoch(Instant newEpoch)
- Specified by:
setEpochin interfaceIRunContext
-
getEpoch
public Instant getEpoch()
- Specified by:
getEpochin interfaceIRunContext
-
enableSimulatedTime
public void enableSimulatedTime(boolean enable)
- Specified by:
enableSimulatedTimein interfaceIRunContext
-
getActiveTimers
public TimerSet getActiveTimers()
- Specified by:
getActiveTimersin interfaceIRunContext
-
getActiveEvents
public EventSet getActiveEvents()
- Specified by:
getActiveEventsin interfaceIRunContext
-
registerEvent
public void registerEvent(IEvent event)
- Specified by:
registerEventin interfaceIRunContext
-
deregisterEvent
public void deregisterEvent(EventHandle e)
- Specified by:
deregisterEventin interfaceIRunContext
-
getEvent
public IEvent getEvent(EventHandle e)
- Specified by:
getEventin interfaceIRunContext
-
getTimer
public Timer getTimer(TimerHandle t)
- Specified by:
getTimerin interfaceIRunContext
-
addChange
public void addChange(IModelDelta delta)
- Specified by:
addChangein interfaceIRunContext
-
getChangeLog
public IChangeLog getChangeLog()
- Specified by:
getChangeLogin interfaceIRunContext
-
getLog
public ILogger getLog()
- Specified by:
getLogin interfaceIRunContext
-
start
public void start()
- Specified by:
startin interfaceIRunContext
-
-