Table of Contents

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

id int

The id of the IProducer for which to set timestamp

timestamp DateTime

A 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

id int

The 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

id int

The id to check

Returns

bool

true if exists, false otherwise

Exists(string)

Check if the IProducer exists in manager

bool Exists(string name)

Parameters

name string

The name to check

Returns

bool

true if exists, false otherwise

GetProducer(int)

Gets the producer if exists, otherwise 'unknown' producer is returned

IProducer GetProducer(int id)

Parameters

id int

The id of the producer to retrieve

Returns

IProducer

An IProducer

GetProducer(string)

Gets the producer by name if exists, otherwise 'unknown' producer is returned

IProducer GetProducer(string name)

Parameters

name string

The name of the producer to retrieve

Returns

IProducer

An IProducer

Remarks

Search is case insensitive

RemoveTimestampBeforeDisconnect(int)

Removes the timestamp of the last message processed for a specific producer

void RemoveTimestampBeforeDisconnect(int id)

Parameters

id int

An id of the IProducer for which to remove the timestamp

Exceptions

ArgumentOutOfRangeException

The id of the producer is not found