public interface EngineClock
| Modifier and Type | Method and Description |
|---|---|
long |
getTime()
Returns the current time in an HA consistent fashion.
|
long |
getTimeMicros()
Returns the current time in microseconds in an HA consistent fashion.
|
long getTime()
This method is intended for use by applications using EventSourcing that do time
dependent message processing. This method provides the current wall time (in millisecond resolution)
as perceived by the AepEngine. If invoked from within a message processor handler and the HA policy
is set to EventSourcing, this method returns the time stamped on the message event (stamped just
before the method is dispatched to the application for processing). Since, for EventSourcing applications,
the message is also replicated for parallel processing on the backup, the backup will receive the same
time when invoking this method thus ensuring identical processing. If this method is called on an engine
operating in state replication mode or called from outside a message processor, then this method will
return the value returned by System.currentTimeMillis().
AepEngine.getEngineTime()long getTimeMicros()
This method is intended for use by applications using EventSourcing that do time
dependent message processing. This method provides the current time (in microsecond resolution)
as perceived by the AepEngine. If invoked from within a message processor handler and the HA policy
is set to EventSourcing, this method returns the time stamped on the message event (stamped just
before the method is dispatched to the application for processing). Since, for EventSourcing applications,
the message is also replicated for parallel processing on the backup, the backup will receive the same
time when invoking this method thus ensuring identical processing. If this method is called on an engine
operating in state replication mode or called from outside a message processor, then this method will
return the value returned by UtlTime.nowSinceEpoch().
AepEngine.getEngineTime(),
UtlTime.nowSinceEpoch()Copyright © 2016 Neeve Research, LLC. All Rights Reserved.