Interface Producer

All Known Implementing Classes:
ProducerImpl

public interface Producer
Represents a Sportradar message producer(Live Odds, Betradar Ctrl, Premium Cricket,...)
  • 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 the UofConfigurationImpl
      Returns:
      true if the producer is available, otherwise false
    • isEnabled

      boolean isEnabled()
      An indication if the producer is enabled. The producer gets by default enabled based on the isAvailable(), but it can be disabled through the ProducerManager
      Returns:
      true if the producer is enabled, otherwise false
    • isFlaggedDown

      boolean isFlaggedDown()
      An indication if the producer is down/out of sync/invalid state
      Returns:
      false if the producer is up, otherwise true
    • 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 a Set of possible ProducerScopes. ProducerScopes indicate what type of event messages will be dispatched by the producer.
      Returns:
      a Set of possible ProducerScopes
    • 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 the ProducerManager.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

      default RecoveryInfo getRecoveryInfo()
      Gets the recovery info about last recovery attempt
      Returns:
      the recovery info about last recovery attempt