Class NotificationProperties

java.lang.Object
com.broadleafcommerce.common.messaging.notification.NotificationProperties

public class NotificationProperties extends Object
Configuration for a NotificationHandler
Author:
Jeff Fischer
  • Constructor Details

    • NotificationProperties

      public NotificationProperties()
  • Method Details

    • 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.
    • isSendEnabled

      public boolean isSendEnabled()
      Whether or not sending on the producer channel is allowed. This will generally always be true, as setting this to false will cause all message sends to fail. Note, this setting can be useful to force engagement of the circuit breaker, or to test failure scenarios.
    • 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.
    • setSendEnabled

      public void setSendEnabled(boolean sendEnabled)
      Whether or not sending on the producer channel is allowed. This will generally always be true, as setting this to false will cause all message sends to fail. Note, this setting can be useful to force engagement of the circuit breaker, or to test failure scenarios.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object