Class CacheMessageProcessor
java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.processing.pipeline.CacheMessageProcessor
- All Implemented Interfaces:
FeedMessageProcessor
A
FeedMessageProcessor implementation which is used in the message processing pipeline-
Constructor Summary
ConstructorsConstructorDescriptionCacheMessageProcessor(SportEventStatusCache sportEventStatusCache, SportEventCache sportEventCache, ProcessedFixtureChangesTracker processedFixtureChangesTracker, SdkProducerManager producerManager) Initializes a newCacheMessageProcessorinstance -
Method Summary
Modifier and TypeMethodDescriptionReturns the processor identifiervoidprocessMessage(UnmarshalledMessage message, byte[] body, RoutingKeyInfo routingKeyInfo, MessageTimestamp timestamp) Processes the provided message.voidsetNextMessageProcessor(FeedMessageProcessor nextMessageProcessor) Sets the next message processor that should be invoked after the message processing is finished
-
Constructor Details
-
CacheMessageProcessor
public CacheMessageProcessor(SportEventStatusCache sportEventStatusCache, SportEventCache sportEventCache, ProcessedFixtureChangesTracker processedFixtureChangesTracker, SdkProducerManager producerManager) Initializes a newCacheMessageProcessorinstance- Parameters:
sportEventStatusCache- theSportEventStatusCacheused by the associated SDK instancesportEventCache- theSportEventCacheused by the associated SDK instanceprocessedFixtureChangesTracker- used to track processed fixture change messagesproducerManager- to get 'virtual' producers to ignore for fixture_change_fixture endpoint
-
-
Method Details
-
processMessage
public void processMessage(UnmarshalledMessage message, byte[] body, RoutingKeyInfo routingKeyInfo, MessageTimestamp timestamp) Processes the provided message. If thenextMessageProcessoris defined, the instance will forward the message to thenextMessageProcessor- Specified by:
processMessagein interfaceFeedMessageProcessor- Parameters:
message- - the message that should be processedbody- - the raw body of the received messageroutingKeyInfo- - aRoutingKeyInfoinstance describing the message routing keytimestamp- - all message timestamps
-
getProcessorId
Description copied from interface:FeedMessageProcessorReturns the processor identifier- Specified by:
getProcessorIdin interfaceFeedMessageProcessor- Returns:
- - the processor identifier
-
setNextMessageProcessor
Description copied from interface:FeedMessageProcessorSets the next message processor that should be invoked after the message processing is finished- Specified by:
setNextMessageProcessorin interfaceFeedMessageProcessor- Parameters:
nextMessageProcessor- - theFeedMessageProcessorimplementation that should be invoked after the message process is finished
-