Class NotificationProperties

    • Constructor Detail

      • NotificationProperties

        public NotificationProperties()
    • Method Detail

      • getFailureRateThreshold

        public float getFailureRateThreshold()
        Configures the failure rate threshold in percentage above which the CircuitBreaker should trip open and start short-circuiting calls. The default is 50.
      • getRingBufferSizeInClosedState

        public int getRingBufferSizeInClosedState()
        Configures the size of the ring buffer when the CircuitBreaker is closed. The CircuitBreaker stores the success/failure status of the latest calls in a ring buffer. For example, if ringBufferSizeInClosedState is 100, then at least 100 calls must be evaluated, before the failure rate can be calculated. If only 99 calls have been evaluated the CircuitBreaker will not trip open even if all 99 calls have failed. The default is 100.
      • getRingBufferSizeInHalfOpenState

        public int getRingBufferSizeInHalfOpenState()
        Configures the size of the ring buffer when the CircuitBreaker is half open. The CircuitBreaker stores the success/failure status of the latest calls in a ring buffer. For example, if ringBufferSizeInClosedState is 10, then at least 10 calls must be evaluated, before the failure rate can be calculated. If only 9 calls have been evaluated the CircuitBreaker will not trip back to closed or open even if all 9 calls have failed. The default is 10.
      • getWaitDurationInOpenState

        public Duration getWaitDurationInOpenState()
        Configures the wait duration which specifies how long the CircuitBreaker should stay open, before it switches to half open. The default is 60 seconds.
      • getSendTimeout

        public Duration getSendTimeout()
        The length of time a message send attempt should block before timing out. Such a timeout is considered a failure. The default is 30 seconds.
      • setFailureRateThreshold

        public void setFailureRateThreshold​(float failureRateThreshold)
        Configures the failure rate threshold in percentage above which the CircuitBreaker should trip open and start short-circuiting calls. The default is 50.
      • setRingBufferSizeInClosedState

        public void setRingBufferSizeInClosedState​(int ringBufferSizeInClosedState)
        Configures the size of the ring buffer when the CircuitBreaker is closed. The CircuitBreaker stores the success/failure status of the latest calls in a ring buffer. For example, if ringBufferSizeInClosedState is 100, then at least 100 calls must be evaluated, before the failure rate can be calculated. If only 99 calls have been evaluated the CircuitBreaker will not trip open even if all 99 calls have failed. The default is 100.
      • setRingBufferSizeInHalfOpenState

        public void setRingBufferSizeInHalfOpenState​(int ringBufferSizeInHalfOpenState)
        Configures the size of the ring buffer when the CircuitBreaker is half open. The CircuitBreaker stores the success/failure status of the latest calls in a ring buffer. For example, if ringBufferSizeInClosedState is 10, then at least 10 calls must be evaluated, before the failure rate can be calculated. If only 9 calls have been evaluated the CircuitBreaker will not trip back to closed or open even if all 9 calls have failed. The default is 10.
      • setWaitDurationInOpenState

        public void setWaitDurationInOpenState​(Duration waitDurationInOpenState)
        Configures the wait duration which specifies how long the CircuitBreaker should stay open, before it switches to half open. The default is 60 seconds.
      • setSendTimeout

        public void setSendTimeout​(Duration sendTimeout)
        The length of time a message send attempt should block before timing out. Such a timeout is considered a failure. The default is 30 seconds.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object