Package com.bank.trading.data
Class ReplayService
java.lang.Object
com.bank.trading.data.ReplayService
- All Implemented Interfaces:
Runnable
Replay service to catch booted up service or lagging service
to the current state of the system.
This service is run as a Thread on the Lamport Clock server.
-
Constructor Summary
ConstructorsConstructorDescriptionReplayService(File logFile, InetSocketAddress address) Constructor to initialize the replay service with the log file. -
Method Summary
-
Constructor Details
-
ReplayService
Constructor to initialize the replay service with the log file.- Parameters:
logFile- The file containing the logged events.
-
-
Method Details
-
run
public void run()This method is responsible for running the Replay service main exection loop. -
getLog
Get the log data starting from a specific time for a given subscriber.- Parameters:
startTime-subscriber-- Returns:
- byte array of the log data in event log format.
-