Interface ProducerManager

All Known Subinterfaces:
SdkProducerManager
All Known Implementing Classes:
ProducerManagerImpl

public interface ProducerManager
The ProducerManager is used to manage Sportradar message producers
  • Method Details

    • getAvailableProducers

      Map<Integer,Producer> getAvailableProducers()
      Returns a Map of all the available Sportradar producers
      Returns:
      - Map of all the available Sportradar producers
    • getActiveProducers

      Map<Integer,Producer> getActiveProducers()
      Returns a Map of activated producers for the provided access token
      Returns:
      - a Map of active producers for the provided access token
    • getProducer

      Producer getProducer(int id)
      Returns the requested Producer
      Parameters:
      id - - the unique identifier of a Producer
      Returns:
      - if the requested producer exists, a valid Producer instance; otherwise unknown-producer is generated
    • enableProducer

      void enableProducer(int producerId)
      Enables te Producer associated 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 te Producer associated 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 too
      lastMessageTimestamp - - 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:
      - true if the producer is enabled, otherwise false
    • 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:
      - true if the producer is down, otherwise false
      See Also: