Interface ProducerManager
- All Known Subinterfaces:
SdkProducerManager
- All Known Implementing Classes:
ProducerManagerImpl
public interface ProducerManager
The
ProducerManager is used to manage Sportradar message producers-
Method Summary
Modifier and TypeMethodDescriptionvoiddisableProducer(int producerId) Disables teProducerassociated with the provided id (by default all the active producers are enabled)voidenableProducer(int producerId) Enables teProducerassociated with the provided id (by default all the active producers are enabled)Returns aMapof activated producers for the provided access tokenReturns aMapof all the available Sportradar producersgetProducer(int id) Returns the requestedProducerbooleanisProducerDown(int producerId) An indication if the producer is currently marked as down by the SDKbooleanisProducerEnabled(int producerId) An indication if the producer is enabled.voidsetProducerRecoveryFromTimestamp(int producerId, long lastMessageTimestamp) Sets the last message received timestamp.
-
Method Details
-
getAvailableProducers
Returns aMapof all the available Sportradar producers- Returns:
- -
Mapof all the available Sportradar producers
-
getActiveProducers
Returns aMapof activated producers for the provided access token- Returns:
- - a
Mapof active producers for the provided access token
-
getProducer
Returns the requestedProducer -
enableProducer
void enableProducer(int producerId) Enables teProducerassociated with the provided id (by default all the active producers are enabled)- Parameters:
producerId- - the identifier of the producer that you want to enable
-
disableProducer
void disableProducer(int producerId) Disables teProducerassociated with the provided id (by default all the active producers are enabled)- Parameters:
producerId- - the identifier of the producer that you want to disable
-
setProducerRecoveryFromTimestamp
void setProducerRecoveryFromTimestamp(int producerId, long lastMessageTimestamp) Sets the last message received timestamp. The value should be set to the timestamp of the last processed message, which was received while the producer was not marked as down. The timestamp is later used to request the feed recovery. The last valid max timestamp is 3 days ago (recovery limitation). See:Producer.getTimestampForRecovery()- Parameters:
producerId- - the identifier of the producer to which the last known message timestamp belongs toolastMessageTimestamp- - the timestamp from which the SDK will request the recovery (in milliseconds)
-
isProducerEnabled
boolean isProducerEnabled(int producerId) An indication if the producer is enabled.- Parameters:
producerId- - the identifier of the producer for which to check- Returns:
- -
trueif the producer is enabled, otherwisefalse
-
isProducerDown
boolean isProducerDown(int producerId) An indication if the producer is currently marked as down by the SDK- Parameters:
producerId- - the identifier of the producer for which to check- Returns:
- -
trueif the producer is down, otherwisefalse - See Also:
-