com.neeve.toa
Interface EngineClock


public interface EngineClock

Provides access to time in an HA Consistent fashion for Topic Oriented applications.


Method Summary
 long getTime()
          Returns the current time in an HA consistent fashion.
 

Method Detail

getTime

long getTime()
Returns the current time in an HA consistent fashion.

This method is intended for use by applications using event sourcing 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 event sourcing, this method returns the time stamped on the message event (stamped just before the method is dispatched to the application for processing). Since, for event sourced 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();

Returns:
The current time in milliseconds.
See Also:
AepEngine.getEngineTime()


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.