Interface RoutingInfo
- All Known Implementing Classes:
RoutingInfo.DynamicRoutingInfo,RoutingInfo.StaticRoutingInfo
public interface RoutingInfo
Utility class that holds the current routing information. To be uses everywhere the number of
partitions or message correlation strategy is needed.
The information always reflects the current persisted routing info from DbRoutingState.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classNaive implementation that always looks up the routing information from theRoutingState.static class -
Method Summary
Modifier and TypeMethodDescriptionstatic RoutingInfodynamic(RoutingState routingState, RoutingInfo fallback) static RoutingInfoforStaticPartitions(int partitionCount) Creates aRoutingInfoinstance for static partitions.intpartitionForCorrelationKey(org.agrona.DirectBuffer correlationKey) Returns the current partition id for the given correlation key.Returns the current set of partitions.
-
Method Details
-
partitions
Returns the current set of partitions. -
partitionForCorrelationKey
int partitionForCorrelationKey(org.agrona.DirectBuffer correlationKey) Returns the current partition id for the given correlation key. -
forStaticPartitions
Creates aRoutingInfoinstance for static partitions. This is used when the partitions are fixed and known at startup. Only relevant for testing. -
dynamic
-