Replayer
Replayer
is used to replay historical data with timestamps in a new, in-memory table.
Syntax
Replayer(startTime, endTime)
Parameters
Parameter | Type | Description |
---|---|---|
startTime | DateTime | Historical data start time |
endTime | DateTime | Historical data end time. |
Returns
A Replayer
object that can be used to replay historical data.
Methods
Replayer
supports the following methods:
replay()
- Prepares a historical table for replaying.start()
- Starts replaying data.shutdown()
- Shuts the replayer down.
Example
The following example creates some fake historical data with timestamps and then replays it.
import io.deephaven.engine.table.impl.replay.Replayer
result = newTable(
instantCol("DateTime", convertDateTime("2000-01-01T00:00:01 NY"), convertDateTime("2000-01-01T00:00:03 NY"), convertDateTime("2000-01-01T00:00:06 NY")),
intCol("Number", 1, 3, 6)
)
startTime = convertDateTime("2000-01-01T00:00:00 NY")
endTime = convertDateTime("2000-01-01T00:00:07 NY")
resultReplayer = new Replayer(startTime, endTime)
replayedResult = resultReplayer.replay(result, "DateTime")
resultReplayer.start()