Class QueueCircuitBreakerRulePatternToCircuitMapping


  • public class QueueCircuitBreakerRulePatternToCircuitMapping
    extends java.lang.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 java.util.List<PatternAndCircuitHash> updateRulePatternToCircuitMapping​(java.util.List<org.swisspush.gateleen.routing.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
      • getCircuitFromRequestUri

        public PatternAndCircuitHash getCircuitFromRequestUri​(java.lang.String requestUri)