Package com.illumon.iris.db.v2.replay
Interface ReplayerInterface
- All Known Implementing Classes:
DataDrivenReplayer,FixedStepReplayer,ReplayClient,Replayer
public interface ReplayerInterface
An interface for replaying historical data as simulated real-time data.
-
Method Summary
Modifier and TypeMethodDescriptionSimulated time.Gets a handle to the replayer.booleanisDone()Has the replayer finished replaying all data.Prepares a historical table for replaying.replayGrouped(Table dataSource, String timeColumn, String byColumn) Prepares a grouped historical table for replaying.replayGroupedLastBy(Table dataSource, String timeColumn, String... groupingColumns) Prepares a grouped historical table for replaying as a last-by table.voidSchedule a task to execute.voidsetTime(long updatedTime) Sets the current replay time.voidshutdown()Shuts down the replayer.voidstart()Starts replaying data.voidwaitDone(long maxTimeMillis) Wait a specified interval for the replayer to complete.
-
Method Details
-
start
Starts replaying data.- Throws:
IOException
-
isDone
Has the replayer finished replaying all data.- Returns:
- true if the replayer has finished replaying all data; false otherwise.
- Throws:
IOException
-
shutdown
Shuts down the replayer.- Throws:
IOException- problem shutting down the replayer.
-
waitDone
Wait a specified interval for the replayer to complete. If the replayer has not completed by the end of the interval, the method returns.- Parameters:
maxTimeMillis- maximum number of milliseconds to wait.- Throws:
IOException- problems encountered
-
setTime
void setTime(long updatedTime) Sets the current replay time.- Parameters:
updatedTime- new replay time.
-
schedule
Schedule a task to execute.- Parameters:
task- task to executedelay- delay in milliseconds before first executing the taskperiod- frequency in milliseconds to execute the task.
-
currentTime
Simulated time.- Returns:
- simulated time.
- Throws:
IOException
-
replay
Prepares a historical table for replaying.- Parameters:
dataSource- historical table to replaytimeColumn- column in the table containing timestamps- Returns:
- dynamic, replayed version of the table.
- Throws:
IOException
-
replayGrouped
Prepares a grouped historical table for replaying. This method can be faster than the ungrouped replay, but the performance increase comes with a cost. Within a group, the data ordering is maintained. Between groups, data ordering is not maintained for a time interval.- Parameters:
dataSource- historical table to replaytimeColumn- column in the table containing timestamps- Returns:
- dynamic, replayed version of the table.
- Throws:
IOException
-
replayGroupedLastBy
Table replayGroupedLastBy(Table dataSource, String timeColumn, String... groupingColumns) throws IOException Prepares a grouped historical table for replaying as a last-by table.- Parameters:
dataSource- historical table to replaytimeColumn- column in the table containing timestampsgroupingColumns- columns used as the key in computing last-by- Returns:
- dynamic, replayed version of the last-by table.
- Throws:
IOException
-
getHandle
ReplayerHandle getHandle()Gets a handle to the replayer.- Returns:
- handle to the replayer.
-