Interface IReplayManager
- Namespace
- Sportradar.OddsFeed.SDK.Api.Replay
- Assembly
- Sportradar.OddsFeed.SDK.dll
Defines a contract implemented by classes capable of interacting with Replay Server
public interface IReplayManager
Methods
AddMessagesToReplayQueue(Urn, int?)
Adds event {eventId} to the end of the replay queue
IReplayResponse AddMessagesToReplayQueue(Urn eventId, int? startTime = null)
Parameters
Returns
- IReplayResponse
Returns an IReplayResponse
GetAvailableScenarios()
Gets a list of available replay scenarios
IEnumerable<IReplayScenario> GetAvailableScenarios()
Returns
- IEnumerable<IReplayScenario>
A list of available replay scenarios
GetEventsInQueue()
Gets the events in replay queue.
IEnumerable<Urn> GetEventsInQueue()
Returns
- IEnumerable<Urn>
Returns an array of event ids
GetReplayEventsInQueue()
Gets list of replay events in queue.
IEnumerable<IReplayEvent> GetReplayEventsInQueue()
Returns
- IEnumerable<IReplayEvent>
Returns a list of replay events
GetStatusOfReplay()
Return the status of player. Possible values are: player is playing, player is stopped, player was never playing.
IReplayStatus GetStatusOfReplay()
Returns
- IReplayStatus
Returns an IReplayResponse
RemoveEventFromReplayQueue(Urn)
Removes the event from replay queue
IReplayResponse RemoveEventFromReplayQueue(Urn eventId)
Parameters
Returns
- IReplayResponse
Returns an IReplayResponse
StartReplay(int, int, int?, bool?)
Start replay the event from replay queue. Events are played in the order they were played in reality
IReplayResponse StartReplay(int speed = 10, int maxDelay = 10000, int? producerId = null, bool? rewriteTimestamps = null)
Parameters
speedintThe speed factor of the replay
maxDelayintThe maximum delay between messages in milliseconds
producerIdint?The id of the producer from which we want to get messages, or null for messages from all producers
rewriteTimestampsbool?Should the timestamp in messages be rewritten with current time
Returns
- IReplayResponse
Returns an IReplayResponse
Remarks
Start replay the event from replay queue. Events are played in the order they were played in reality, e.g. if there are some events that were played simultaneously in reality, they will be played in parallel as well here on replay server. If not specified, default values speed = 10 and max_delay = 10000 are used. This means that messages will be sent 10x faster than in reality, and that if there was some delay between messages that was longer than 10 seconds it will be reduced to exactly 10 seconds/10 000 ms (this is helpful especially in pre-match odds where delay can be even a few hours or more). If player is already in play, nothing will happen
StartReplay(int, int, int?, bool?, bool?)
Start replay the event from replay queue. Events are played in the order they were played in reality
IReplayResponse StartReplay(int speed, int maxDelay, int? producerId, bool? rewriteTimestamps, bool? runParallel)
Parameters
speedintThe speed factor of the replay
maxDelayintThe maximum delay between messages in milliseconds
producerIdint?The id of the producer from which we want to get messages, or null for messages from all producers
rewriteTimestampsbool?Should the timestamp in messages be rewritten with current time
runParallelbool?Should the events in queue replay independently
Returns
- IReplayResponse
Returns an IReplayResponse
Remarks
Start replay the event from replay queue. Events are played in the order they were played in reality, e.g. if there are some events that were played simultaneously in reality, they will be played in parallel as well here on replay server. If not specified, default values speed = 10 and max_delay = 10000 are used. This means that messages will be sent 10x faster than in reality, and that if there was some delay between messages that was longer than 10 seconds it will be reduced to exactly 10 seconds/10 000 ms (this is helpful especially in pre-match odds where delay can be even a few hours or more). If player is already in play, nothing will happen
StartReplayScenario(int, int, int, int?, bool?)
Starts playing a predefined scenario
IReplayResponse StartReplayScenario(int scenarioId, int speed = 10, int maxDelay = 10000, int? producerId = null, bool? rewriteTimestamps = null)
Parameters
scenarioIdintThe identifier of the scenario that should be played
speedintThe speed factor of the replay
maxDelayintThe maximum delay between messages in milliseconds
producerIdint?The id of the producer from which we want to get messages, or null for messages from all producers
rewriteTimestampsbool?Should the timestamp in messages be rewritten with current time
Returns
- IReplayResponse
Returns an IReplayResponse
Remarks
Start replay the event from replay queue. Events are played in the order they were played in reality, e.g. if there are some events that were played simultaneously in reality, they will be played in parallel as well here on replay server. If not specified, default values speed = 10 and max_delay = 10000 are used. This means that messages will be sent 10x faster than in reality, and that if there was some delay between messages that was longer than 10 seconds it will be reduced to exactly 10 seconds/10 000 ms (this is helpful especially in pre-match odds where delay can be even a few hours or more). If player is already in play, nothing will happen
StopAndClearReplay()
Stop the player if it is currently playing and clear the replay queue. If player is already stopped, the queue is cleared.
IReplayResponse StopAndClearReplay()
Returns
- IReplayResponse
Returns an IReplayResponse
StopReplay()
Stop the player if it is currently playing. If player is already stopped, nothing will happen.
IReplayResponse StopReplay()
Returns
- IReplayResponse
Returns an IReplayResponse