public class ReplayManager extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
addSportEventToReplay(SportEvent event)
Add a SportEvent to the list of SportEvents whose recorded messages will be replayed.
|
boolean |
addSportEventToReplay(SportEvent event,
Integer startTime)
Add a SportEvent to the list of SportEvents whose recorded messages will be replayed.
|
boolean |
addSportEventToReplay(URN id)
Add a SportEvent to the list of SportEvents whose recorded messages will be replayed.
|
boolean |
addSportEventToReplay(URN id,
Integer startTime)
Add a SportEvent to the list of SportEvents whose recorded messages will be replayed.
|
boolean |
clear()
Stops playing recorded messages from the playlist and clears the playlist.
|
List<ReplayScenario> |
getAvailableScenarios()
Returns a
List of available replay scenarios |
ReplayStatus |
getPlayStatus()
Get the current status of the replayer
|
List<SportEvent> |
getReplayList() |
List<ReplaySportEvent> |
getReplaySportEventsList() |
boolean |
play()
Starts playing the messages for the SportEvents in the play list.
|
boolean |
play(double speedupFactor,
int maxDelayInMs)
Starts playing the messages for the SportEvents in the play list.
|
boolean |
play(double speedupFactor,
int maxDelayInMs,
Boolean runParallel)
Starts playing the messages for the SportEvents in the play list.
|
boolean |
play(double speedupFactor,
int maxDelayInMs,
Integer producerId,
Boolean rewriteTimestamps)
Starts playing the messages for the SportEvents in the play list
|
boolean |
play(double speedupFactor,
int maxDelayInMs,
Integer producerId,
Boolean rewriteTimestamps,
Boolean runParallel)
Starts playing the messages for the SportEvents in the play list
|
boolean |
playScenario(int id)
Starts the replay of the selected scenario
|
boolean |
playScenario(int id,
double speedupFactor,
int maxDelayInMs)
Starts the replay of the selected scenario
|
boolean |
playScenario(int id,
double speedupFactor,
int maxDelayInMs,
Integer producerId,
Boolean rewriteTimestamps)
Starts playing the messages for the SportEvents in the play list
|
boolean |
removeSportEventFromReplay(URN id)
Removes a sport event from the replay list
|
boolean |
stop()
Stops playing recorded messages from the playlist.
|
public List<SportEvent> getReplayList()
public List<ReplaySportEvent> getReplaySportEventsList()
public boolean addSportEventToReplay(SportEvent event)
event
- the SportEvent to addpublic boolean addSportEventToReplay(SportEvent event, Integer startTime)
event
- the SportEvent to addstartTime
- minutes relative to event start timepublic boolean addSportEventToReplay(URN id)
id
- the id of the SportEvent to addpublic boolean addSportEventToReplay(URN id, Integer startTime)
id
- the id of the SportEvent to addstartTime
- minutes relative to event start timepublic boolean removeSportEventFromReplay(URN id)
id
- the identifier of the event which should be removed from the replay listtrue
if the removal was successful, otherwise false
public boolean play()
public boolean play(double speedupFactor, int maxDelayInMs)
speedupFactor
- how much faster to replay the recorded events (by default this is 10x
faster)maxDelayInMs
- the longest delay between two messages, if the delay would have been longer
than this it is shortened to this much. This is to avoid waiting for very long if two
messages were very far apart.public boolean play(double speedupFactor, int maxDelayInMs, Boolean runParallel)
speedupFactor
- how much faster to replay the recorded events (by default this is 10x
faster)maxDelayInMs
- the longest delay between two messages, if the delay would have been longer
than this it is shortened to this much. This is to avoid waiting for very long if two
messages were very far apart.runParallel
- an indication if every event in the queue should be replayed independently. Speed factor and
delay will be applied for each event separately.public boolean play(double speedupFactor, int maxDelayInMs, Integer producerId, Boolean rewriteTimestamps)
speedupFactor
- how much faster to replay the recorded events (by default this is 10x
faster)maxDelayInMs
- the longest delay between two messages, if the delay would have been longer
than this it is shortened to this much. This is to avoid waiting for very long if two
messages were very far apartproducerId
- the producer from which the messages should be playedrewriteTimestamps
- an indication if the message timestamps should be rewritten with current timestampspublic boolean play(double speedupFactor, int maxDelayInMs, Integer producerId, Boolean rewriteTimestamps, Boolean runParallel)
speedupFactor
- how much faster to replay the recorded events (by default this is 10x
faster)maxDelayInMs
- the longest delay between two messages, if the delay would have been longer
than this it is shortened to this much. This is to avoid waiting for very long if two
messages were very far apartproducerId
- the producer from which the messages should be playedrewriteTimestamps
- an indication if the message timestamps should be rewritten with current timestampsrunParallel
- an indication if every event in the queue should be replayed independently. Speed factor and
delay will be applied for each event separately.public boolean stop()
public boolean clear()
public ReplayStatus getPlayStatus()
public List<ReplayScenario> getAvailableScenarios()
List
of available replay scenariosList
of available replay scenariospublic boolean playScenario(int id)
id
- the identifier of the scenario that you want to replaytrue
if the request executed successfully, otherwise false
public boolean playScenario(int id, double speedupFactor, int maxDelayInMs)
id
- the identifier of the scenario that you want to replayspeedupFactor
- how much faster to replay the scenario events (by default this is 10x
faster)maxDelayInMs
- the longest delay between two messages, if the delay would be longer
than this it is shortened to this much. This is to avoid waiting for very long if two
messages were very far apart.public boolean playScenario(int id, double speedupFactor, int maxDelayInMs, Integer producerId, Boolean rewriteTimestamps)
id
- the identifier of the scenario that you want to replayspeedupFactor
- how much faster to replay the recorded events (by default this is 10x
faster)maxDelayInMs
- the longest delay between two messages, if the delay would be longer
than this it is shortened to this much. This is to avoid waiting for very long if two
messages were very far apartproducerId
- the producer from which the messages should be playedrewriteTimestamps
- an indication if the message timestamps should be rewritten with current timestampsCopyright © 2016–2023. All rights reserved.