Interface IProducerManager
- Namespace
- Sportradar.OddsFeed.SDK.Api.Managers
- Assembly
- Sportradar.OddsFeed.SDK.dll
Defines a contract implemented by classes used to manage feed producers
public interface IProducerManager
Properties
Producers
Gets the available producers
IReadOnlyCollection<IProducer> Producers { get; }
Property Value
- IReadOnlyCollection<IProducer>
The producers
Methods
AddTimestampBeforeDisconnect(int, DateTime)
Sets the timestamp of the last processed message for a specific producer
void AddTimestampBeforeDisconnect(int id, DateTime timestamp)
Parameters
idintThe id of the IProducer for which to set timestamp
timestampDateTimeA DateTime specifying the message timestamp
Exceptions
- ArgumentOutOfRangeException
The timestamp is in the future or to far in the past
DisableProducer(int)
Disables the producer (no recovery will be made and not message will be received)
void DisableProducer(int id)
Parameters
idintThe id of the producer
Exceptions
- ArgumentOutOfRangeException
The id of the producer is not found
Exists(int)
Check if the IProducer exists in manager
bool Exists(int id)
Parameters
idintThe id to check
Returns
- bool
trueif exists,falseotherwise
Exists(string)
Check if the IProducer exists in manager
bool Exists(string name)
Parameters
namestringThe name to check
Returns
- bool
trueif exists,falseotherwise
GetProducer(int)
Gets the producer if exists, otherwise 'unknown' producer is returned
IProducer GetProducer(int id)
Parameters
idintThe id of the producer to retrieve
Returns
GetProducer(string)
Gets the producer by name if exists, otherwise 'unknown' producer is returned
IProducer GetProducer(string name)
Parameters
namestringThe name of the producer to retrieve
Returns
Remarks
Search is case insensitive
RemoveTimestampBeforeDisconnect(int)
Removes the timestamp of the last message processed for a specific producer
void RemoveTimestampBeforeDisconnect(int id)
Parameters
Exceptions
- ArgumentOutOfRangeException
The id of the producer is not found