Interface Producer
- All Known Implementing Classes:
ProducerImpl
public interface Producer
Represents a Sportradar message producer(Live Odds, Betradar Ctrl, Premium Cricket,...)
-
Method Summary
Modifier and TypeMethodDescriptionReturns the producer API url.Returns a short description of the producerintgetId()Returns the unique producer identifierlongReturns a timestamp indicating when was the last message received from the associated producerlongReturns the last processed message generation timestampgetName()Returns the name of the producerlongReturns the messaging queue processing delay in milliseconds (current time - message generation timestamp difference)Returns aSetof possibleProducerScopes.default RecoveryInfoGets the recovery info about last recovery attemptintReturns the max allowed stateful recovery window in minuteslongReturns a timestamp which indicates the last known verified time in which the SDK was in sync with the feed.booleanAn indication if the producer is available with the token provided with theUofConfigurationImplbooleanAn indication if the producer is enabled.booleanAn indication if the producer is down/out of sync/invalid state
-
Method Details
-
getId
int getId()Returns the unique producer identifier- Returns:
- the unique producer identifier
-
getName
String getName()Returns the name of the producer- Returns:
- the name of the producer
-
getDescription
String getDescription()Returns a short description of the producer- Returns:
- a short description of the producer
-
getLastMessageTimestamp
long getLastMessageTimestamp()Returns a timestamp indicating when was the last message received from the associated producer- Returns:
- a timestamp indicating when was the last message received
-
isAvailable
boolean isAvailable()An indication if the producer is available with the token provided with theUofConfigurationImpl- Returns:
trueif the producer is available, otherwisefalse
-
isEnabled
boolean isEnabled()An indication if the producer is enabled. The producer gets by default enabled based on theisAvailable(), but it can be disabled through theProducerManager- Returns:
trueif the producer is enabled, otherwisefalse
-
isFlaggedDown
boolean isFlaggedDown()An indication if the producer is down/out of sync/invalid state- Returns:
falseif the producer is up, otherwisetrue
-
getApiUrl
String getApiUrl()Returns the producer API url. This url may be used to perform additional requests that are specific per producer, as an example, the SDK uses this url to perform individual recovery requests- Returns:
- the producer API url
-
getProducerScopes
Set<ProducerScope> getProducerScopes()Returns aSetof possibleProducerScopes.ProducerScopes indicate what type of event messages will be dispatched by the producer.- Returns:
- a
Setof possibleProducerScopes
-
getLastProcessedMessageGenTimestamp
long getLastProcessedMessageGenTimestamp()Returns the last processed message generation timestamp- Returns:
- the last processed message generation timestamp
-
getProcessingQueDelay
long getProcessingQueDelay()Returns the messaging queue processing delay in milliseconds (current time - message generation timestamp difference)- Returns:
- the messaging queue processing delay in milliseconds (current time - message generation timestamp difference)
-
getTimestampForRecovery
long getTimestampForRecovery()Returns a timestamp which indicates the last known verified time in which the SDK was in sync with the feed. The returned timestamp should be used to initiate the initial SDK recovery after a restart, this can be done through theProducerManager.setProducerRecoveryFromTimestamp(int, long)method.- Returns:
- the last timestamp in which the SDK was in sync with the feed
-
getStatefulRecoveryWindowInMinutes
int getStatefulRecoveryWindowInMinutes()Returns the max allowed stateful recovery window in minutes- Returns:
- the max allowed stateful recovery window in minutes
-
getRecoveryInfo
Gets the recovery info about last recovery attempt- Returns:
- the recovery info about last recovery attempt
-