public class ProducerManagerImpl extends Object implements SdkProducerManager
Constructor and Description |
---|
ProducerManagerImpl(SdkInternalConfiguration configuration,
ProducerDataProvider producerDataProvider,
TimeUtils time) |
Modifier and Type | Method and Description |
---|---|
void |
disableProducer(int producerId)
Disables te
Producer associated with the provided id
(by default all the active producers are enabled) |
void |
enableProducer(int producerId)
Enables te
Producer associated with the provided id
(by default all the active producers are enabled) |
Map<Integer,Producer> |
getActiveProducers()
Returns a
Map of activated producers for the provided access token |
Map<Integer,Producer> |
getAvailableProducers()
Returns a
Map of all the available Sportradar producers |
Producer |
getProducer(int id)
Returns the requested
Producer |
long |
getProducerLastRecoveryAttemptTimestamp(int producerId) |
long |
getProducerLastRecoveryMessageTimestamp(int producerId) |
void |
internalSetProducerLastMessageTimestamp(int producerId,
long lastMessageTimestamp) |
void |
internalSetProducerLastRecoveryAttemptTimestamp(int producerId,
long lastRecoveryAttemptTimestamp) |
void |
internalSetProducerLastRecoveryMessageTimestamp(int producerId,
long lastRecoveryMessageTimestamp) |
boolean |
isProducerDown(int producerId)
An indication if the producer is currently marked as down by the SDK
|
boolean |
isProducerEnabled(int producerId)
An indication if the producer is enabled.
|
void |
open() |
void |
setLastAliveReceivedGenTimestamp(int producerId,
long aliveReceivedGenTimestamp) |
void |
setLastProcessedMessageGenTimestamp(int producerId,
long lastProcessedMessageGenTimestamp) |
void |
setProducerDown(int producerId,
boolean flaggedDown) |
void |
setProducerRecoveryFromTimestamp(int producerId,
long lastMessageTimestamp)
Sets the last message received timestamp.
|
void |
setProducerRecoveryInfo(int producerId,
RecoveryInfo recoveryInfo) |
@Inject public ProducerManagerImpl(SdkInternalConfiguration configuration, ProducerDataProvider producerDataProvider, TimeUtils time)
public Map<Integer,Producer> getAvailableProducers()
ProducerManager
Map
of all the available Sportradar producersgetAvailableProducers
in interface ProducerManager
Map
of all the available Sportradar producerspublic Map<Integer,Producer> getActiveProducers()
ProducerManager
Map
of activated producers for the provided access tokengetActiveProducers
in interface ProducerManager
Map
of active producers for the provided access tokenpublic Producer getProducer(int id)
ProducerManager
Producer
getProducer
in interface ProducerManager
id
- - the unique identifier of a Producer
Producer
instance; otherwise unknown-producer is generatedpublic void enableProducer(int producerId)
ProducerManager
Producer
associated with the provided id
(by default all the active producers are enabled)enableProducer
in interface ProducerManager
producerId
- - the identifier of the producer that you want to enablepublic void disableProducer(int producerId)
ProducerManager
Producer
associated with the provided id
(by default all the active producers are enabled)disableProducer
in interface ProducerManager
producerId
- - the identifier of the producer that you want to disablepublic void setProducerRecoveryFromTimestamp(int producerId, long lastMessageTimestamp)
ProducerManager
Producer.getTimestampForRecovery()
setProducerRecoveryFromTimestamp
in interface ProducerManager
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)public boolean isProducerEnabled(int producerId)
ProducerManager
isProducerEnabled
in interface ProducerManager
producerId
- - the identifier of the producer for which to checktrue
if the producer is enabled, otherwise false
public boolean isProducerDown(int producerId)
ProducerManager
isProducerDown
in interface ProducerManager
producerId
- - the identifier of the producer for which to checktrue
if the producer is down, otherwise false
ProducerDownReason
public void open()
open
in interface SdkProducerManager
public void setProducerDown(int producerId, boolean flaggedDown)
setProducerDown
in interface SdkProducerManager
public void internalSetProducerLastMessageTimestamp(int producerId, long lastMessageTimestamp)
internalSetProducerLastMessageTimestamp
in interface SdkProducerManager
public void internalSetProducerLastRecoveryMessageTimestamp(int producerId, long lastRecoveryMessageTimestamp)
internalSetProducerLastRecoveryMessageTimestamp
in interface SdkProducerManager
public void setLastProcessedMessageGenTimestamp(int producerId, long lastProcessedMessageGenTimestamp)
setLastProcessedMessageGenTimestamp
in interface SdkProducerManager
public void setLastAliveReceivedGenTimestamp(int producerId, long aliveReceivedGenTimestamp)
setLastAliveReceivedGenTimestamp
in interface SdkProducerManager
public void setProducerRecoveryInfo(int producerId, RecoveryInfo recoveryInfo)
setProducerRecoveryInfo
in interface SdkProducerManager
public long getProducerLastRecoveryMessageTimestamp(int producerId)
getProducerLastRecoveryMessageTimestamp
in interface SdkProducerManager
public void internalSetProducerLastRecoveryAttemptTimestamp(int producerId, long lastRecoveryAttemptTimestamp)
internalSetProducerLastRecoveryAttemptTimestamp
in interface SdkProducerManager
public long getProducerLastRecoveryAttemptTimestamp(int producerId)
getProducerLastRecoveryAttemptTimestamp
in interface SdkProducerManager
Copyright © 2016–2025. All rights reserved.