Class DestinationTopicContainer
- java.lang.Object
-
- org.springframework.kafka.retrytopic.destinationtopic.DestinationTopicContainer
-
- All Implemented Interfaces:
java.util.EventListener,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>,DestinationTopicResolver
public class DestinationTopicContainer extends java.lang.Object implements DestinationTopicResolver, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
Contains the destination topics and correlates them with their source via the Map<String,DestinationTopicResolver.DestinationsHolder> map. Implements theDestinationTopicResolverinterface.- Since:
- 2.7
- Author:
- Tomaz Fernandes
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.springframework.kafka.retrytopic.destinationtopic.DestinationTopicResolver
DestinationTopicResolver.DestinationsHolder
-
-
Constructor Summary
Constructors Constructor Description DestinationTopicContainer(java.time.Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDestinations(java.util.Map<java.lang.String,DestinationTopicResolver.DestinationsHolder> sourceDestinationMapToAdd)DestinationTopicgetCurrentTopic(java.lang.String topic)voidonApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)longresolveDestinationNextExecutionTimestamp(java.lang.String topic, java.lang.Integer attempt, java.lang.Exception e, long originalTimestamp)DestinationTopicresolveNextDestination(java.lang.String topic, java.lang.Integer attempt, java.lang.Exception e, long originalTimestamp)
-
-
-
Method Detail
-
resolveNextDestination
public DestinationTopic resolveNextDestination(java.lang.String topic, java.lang.Integer attempt, java.lang.Exception e, long originalTimestamp)
- Specified by:
resolveNextDestinationin interfaceDestinationTopicResolver
-
resolveDestinationNextExecutionTimestamp
public long resolveDestinationNextExecutionTimestamp(java.lang.String topic, java.lang.Integer attempt, java.lang.Exception e, long originalTimestamp)- Specified by:
resolveDestinationNextExecutionTimestampin interfaceDestinationTopicResolver
-
getCurrentTopic
public DestinationTopic getCurrentTopic(java.lang.String topic)
- Specified by:
getCurrentTopicin interfaceDestinationTopicResolver
-
addDestinations
public void addDestinations(java.util.Map<java.lang.String,DestinationTopicResolver.DestinationsHolder> sourceDestinationMapToAdd)
- Specified by:
addDestinationsin interfaceDestinationTopicResolver
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
-