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 theDestinationTopicResolver
interface.- 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 void
addDestinations(java.util.Map<java.lang.String,DestinationTopicResolver.DestinationsHolder> sourceDestinationMapToAdd)
DestinationTopic
getCurrentTopic(java.lang.String topic)
void
onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
long
resolveDestinationNextExecutionTimestamp(java.lang.String topic, java.lang.Integer attempt, java.lang.Exception e, long originalTimestamp)
DestinationTopic
resolveNextDestination(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:
resolveNextDestination
in interfaceDestinationTopicResolver
-
resolveDestinationNextExecutionTimestamp
public long resolveDestinationNextExecutionTimestamp(java.lang.String topic, java.lang.Integer attempt, java.lang.Exception e, long originalTimestamp)
- Specified by:
resolveDestinationNextExecutionTimestamp
in interfaceDestinationTopicResolver
-
getCurrentTopic
public DestinationTopic getCurrentTopic(java.lang.String topic)
- Specified by:
getCurrentTopic
in interfaceDestinationTopicResolver
-
addDestinations
public void addDestinations(java.util.Map<java.lang.String,DestinationTopicResolver.DestinationsHolder> sourceDestinationMapToAdd)
- Specified by:
addDestinations
in interfaceDestinationTopicResolver
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
-