Class NoopCircuitBreaker

  • All Implemented Interfaces:

    public class NoopCircuitBreaker
    extends java.lang.Object
    implements CircuitBreaker
    A CircuitBreaker that doesn't increment or adjust, and all operations are basically noops
    • Constructor Detail

      • NoopCircuitBreaker

        public NoopCircuitBreaker​(java.lang.String name)
    • Method Detail

      • circuitBreak

        public void circuitBreak​(java.lang.String fieldName,
                                 long bytesNeeded)
        Description copied from interface: CircuitBreaker
        Trip the circuit breaker
        Specified by:
        circuitBreak in interface CircuitBreaker
        fieldName - name of the field responsible for tripping the breaker
        bytesNeeded - bytes asked for but unable to be allocated
      • getUsed

        public long getUsed()
        Specified by:
        getUsed in interface CircuitBreaker
        the currently used bytes the breaker is tracking
      • getLimit

        public long getLimit()
        Specified by:
        getLimit in interface CircuitBreaker
        maximum number of bytes the circuit breaker can track before tripping
      • getOverhead

        public double getOverhead()
        Specified by:
        getOverhead in interface CircuitBreaker
        overhead of circuit breaker
      • getTrippedCount

        public long getTrippedCount()
        Specified by:
        getTrippedCount in interface CircuitBreaker
        the number of times the circuit breaker has been tripped
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface CircuitBreaker
        the name of the breaker