Class QueueCircuitBreakerRulePatternToCircuitMapping


  • public class QueueCircuitBreakerRulePatternToCircuitMapping
    extends Object
    Helper class to map Rule objects to PatternAndCircuitHash objects.
    Author:
    https://github.com/mcweba [Marc-Andre Weber]
    • Constructor Detail

      • QueueCircuitBreakerRulePatternToCircuitMapping

        public QueueCircuitBreakerRulePatternToCircuitMapping()
    • Method Detail

      • updateRulePatternToCircuitMapping

        public List<PatternAndCircuitHash> updateRulePatternToCircuitMapping​(List<Rule> rules)
        Updates the mapping with the provided routing rules. Returns a list of PatternAndCircuitHash objects which have been removed with the provided list of rules.
        Example
         current mapping: [{pattern1,hash1}, {pattern2,hash2}, {pattern3,hash3}]
         new routing rules: [{pattern1}, {pattern3}, {pattern4}]
         return value: [{pattern2,hash2}]
         
        Parameters:
        rules - the list of routing rules to update the mapping with
        Returns:
        a list of removed PatternAndCircuitHash objects