Class NotificationProperties
- java.lang.Object
-
- com.broadleafcommerce.common.messaging.notification.NotificationProperties
-
public class NotificationProperties extends Object
Configuration for aNotificationHandler
- Author:
- Jeff Fischer
-
-
Constructor Summary
Constructors Constructor Description NotificationProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
float
getFailureRateThreshold()
Configures the failure rate threshold in percentage above which the CircuitBreaker should trip open and start short-circuiting calls.int
getRingBufferSizeInClosedState()
Configures the size of the ring buffer when the CircuitBreaker is closed.int
getRingBufferSizeInHalfOpenState()
Configures the size of the ring buffer when the CircuitBreaker is half open.Duration
getSendTimeout()
The length of time a message send attempt should block before timing out.Duration
getWaitDurationInOpenState()
Configures the wait duration which specifies how long the CircuitBreaker should stay open, before it switches to half open.int
hashCode()
void
setFailureRateThreshold(float failureRateThreshold)
Configures the failure rate threshold in percentage above which the CircuitBreaker should trip open and start short-circuiting calls.void
setRingBufferSizeInClosedState(int ringBufferSizeInClosedState)
Configures the size of the ring buffer when the CircuitBreaker is closed.void
setRingBufferSizeInHalfOpenState(int ringBufferSizeInHalfOpenState)
Configures the size of the ring buffer when the CircuitBreaker is half open.void
setSendTimeout(Duration sendTimeout)
The length of time a message send attempt should block before timing out.void
setWaitDurationInOpenState(Duration waitDurationInOpenState)
Configures the wait duration which specifies how long the CircuitBreaker should stay open, before it switches to half open.String
toString()
-
-
-
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, ifringBufferSizeInClosedState
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, ifringBufferSizeInClosedState
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, ifringBufferSizeInClosedState
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, ifringBufferSizeInClosedState
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)
-
-