Package com.illumon.iris.db.v2.replay
Class ReplayClient
java.lang.Object
com.illumon.iris.db.v2.replay.ReplayClient
- All Implemented Interfaces:
ReplayerInterface
-
Constructor Summary
ConstructorsConstructorDescriptionReplayClient(RemoteDatabase remoteDatabase, DBDateTime time, DBDateTime endTime, long increment, boolean dataDriven) -
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 groupColumn) Prepares a grouped historical table for replaying.replayGroupedLastBy(Table dataSource, String timeColumn, String groupColumn) replayGroupedLastBy(Table dataSource, String timeColumn, String[] groupColumn) 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.
-
Constructor Details
-
ReplayClient
public ReplayClient(RemoteDatabase remoteDatabase, DBDateTime time, DBDateTime endTime, long increment, boolean dataDriven) throws IOException - Throws:
IOException
-
-
Method Details
-
start
Description copied from interface:ReplayerInterfaceStarts replaying data.- Specified by:
startin interfaceReplayerInterface- Throws:
IOException
-
currentTime
Description copied from interface:ReplayerInterfaceSimulated time.- Specified by:
currentTimein interfaceReplayerInterface- Returns:
- simulated time.
- Throws:
IOException
-
replay
Description copied from interface:ReplayerInterfacePrepares a historical table for replaying.- Specified by:
replayin interfaceReplayerInterface- Parameters:
dataSource- historical table to replaytimeColumn- column in the table containing timestamps- Returns:
- dynamic, replayed version of the table.
- Throws:
IOException
-
replayGrouped
public Table replayGrouped(Table dataSource, String timeColumn, String groupColumn) throws IOException Description copied from interface:ReplayerInterfacePrepares 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.- Specified by:
replayGroupedin interfaceReplayerInterface- Parameters:
dataSource- historical table to replaytimeColumn- column in the table containing timestamps- Returns:
- dynamic, replayed version of the table.
- Throws:
IOException
-
replayGroupedLastBy
public Table replayGroupedLastBy(Table dataSource, String timeColumn, String[] groupColumn) throws IOException Description copied from interface:ReplayerInterfacePrepares a grouped historical table for replaying as a last-by table.- Specified by:
replayGroupedLastByin interfaceReplayerInterface- Parameters:
dataSource- historical table to replaytimeColumn- column in the table containing timestampsgroupColumn- columns used as the key in computing last-by- Returns:
- dynamic, replayed version of the last-by table.
- Throws:
IOException
-
getHandle
Description copied from interface:ReplayerInterfaceGets a handle to the replayer.- Specified by:
getHandlein interfaceReplayerInterface- Returns:
- handle to the replayer.
-
replayGroupedLastBy
public Table replayGroupedLastBy(Table dataSource, String timeColumn, String groupColumn) throws IOException - Throws:
IOException
-
shutdown
Description copied from interface:ReplayerInterfaceShuts down the replayer.- Specified by:
shutdownin interfaceReplayerInterface- Throws:
IOException- problem shutting down the replayer.
-
waitDone
Description copied from interface:ReplayerInterfaceWait a specified interval for the replayer to complete. If the replayer has not completed by the end of the interval, the method returns.- Specified by:
waitDonein interfaceReplayerInterface- Parameters:
maxTimeMillis- maximum number of milliseconds to wait.- Throws:
IOException- problems encountered
-
isDone
Description copied from interface:ReplayerInterfaceHas the replayer finished replaying all data.- Specified by:
isDonein interfaceReplayerInterface- Returns:
- true if the replayer has finished replaying all data; false otherwise.
- Throws:
IOException
-
setTime
public void setTime(long updatedTime) Description copied from interface:ReplayerInterfaceSets the current replay time.- Specified by:
setTimein interfaceReplayerInterface- Parameters:
updatedTime- new replay time.
-
schedule
Description copied from interface:ReplayerInterfaceSchedule a task to execute.- Specified by:
schedulein interfaceReplayerInterface- Parameters:
flushTask- task to executeminute- delay in milliseconds before first executing the taskminute1- frequency in milliseconds to execute the task.
-