Class ProducerImpl
java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.ProducerImpl
- All Implemented Interfaces:
Producer
-
Constructor Summary
Constructors -
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.Gets 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 statetoString()
-
Constructor Details
-
ProducerImpl
-
-
Method Details
-
getId
public int getId()Description copied from interface:ProducerReturns the unique producer identifier -
getName
Description copied from interface:ProducerReturns the name of the producer -
getDescription
Description copied from interface:ProducerReturns a short description of the producer- Specified by:
getDescriptionin interfaceProducer- Returns:
- a short description of the producer
-
isAvailable
public boolean isAvailable()Description copied from interface:ProducerAn indication if the producer is available with the token provided with theUofConfigurationImpl- Specified by:
isAvailablein interfaceProducer- Returns:
trueif the producer is available, otherwisefalse
-
getLastMessageTimestamp
public long getLastMessageTimestamp()Description copied from interface:ProducerReturns a timestamp indicating when was the last message received from the associated producer- Specified by:
getLastMessageTimestampin interfaceProducer- Returns:
- a timestamp indicating when was the last message received
-
isEnabled
public boolean isEnabled()Description copied from interface:ProducerAn indication if the producer is enabled. The producer gets by default enabled based on theProducer.isAvailable(), but it can be disabled through theProducerManager -
isFlaggedDown
public boolean isFlaggedDown()Description copied from interface:ProducerAn indication if the producer is down/out of sync/invalid state- Specified by:
isFlaggedDownin interfaceProducer- Returns:
falseif the producer is up, otherwisetrue
-
getApiUrl
Description copied from interface:ProducerReturns 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 -
getProducerScopes
Description copied from interface:ProducerReturns aSetof possibleProducerScopes.ProducerScopes indicate what type of event messages will be dispatched by the producer.- Specified by:
getProducerScopesin interfaceProducer- Returns:
- a
Setof possibleProducerScopes
-
getLastProcessedMessageGenTimestamp
public long getLastProcessedMessageGenTimestamp()Description copied from interface:ProducerReturns the last processed message generation timestamp- Specified by:
getLastProcessedMessageGenTimestampin interfaceProducer- Returns:
- the last processed message generation timestamp
-
getProcessingQueDelay
public long getProcessingQueDelay()Description copied from interface:ProducerReturns the messaging queue processing delay in milliseconds (current time - message generation timestamp difference)- Specified by:
getProcessingQueDelayin interfaceProducer- Returns:
- the messaging queue processing delay in milliseconds (current time - message generation timestamp difference)
-
getTimestampForRecovery
public long getTimestampForRecovery()Description copied from interface:ProducerReturns 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.- Specified by:
getTimestampForRecoveryin interfaceProducer- Returns:
- the last timestamp in which the SDK was in sync with the feed
-
getStatefulRecoveryWindowInMinutes
public int getStatefulRecoveryWindowInMinutes()Description copied from interface:ProducerReturns the max allowed stateful recovery window in minutes- Specified by:
getStatefulRecoveryWindowInMinutesin interfaceProducer- Returns:
- the max allowed stateful recovery window in minutes
-
getRecoveryInfo
Description copied from interface:ProducerGets the recovery info about last recovery attempt- Specified by:
getRecoveryInfoin interfaceProducer- Returns:
- the recovery info about last recovery attempt
-
toString
-