Record Class HandlerConfig.RetryPolicy
java.lang.Object
java.lang.Record
com.inductiveautomation.eventstream.config.HandlerConfig.RetryPolicy
- Record Components:
type
- Determines how the delay is calculatedretryCount
- Count retry attempts to makedelayMs
- Delay between retry attemptsmaxDelayMs
- Maximum amount of time to wait before retrymultiplier
- Increases the delayMs based on retry attempt (delay = delayMs * multiplier^attempt)abort
- True, abort processing on last attempt. False, ignore error on last attempt and continue processing remaining handlers.
- All Implemented Interfaces:
Serializable
- Enclosing class:
- HandlerConfig
public static record HandlerConfig.RetryPolicy(HandlerConfig.RetryPolicy.Type type, int retryCount, long delayMs, long maxDelayMs, int multiplier, boolean abort)
extends Record
implements Serializable
Determines how retries are attempted
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRetryPolicy
(HandlerConfig.RetryPolicy.Type type, int retryCount, long delayMs, long maxDelayMs, int multiplier, boolean abort) Creates an instance of aRetryPolicy
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
abort()
Returns the value of theabort
record component.long
delayMs()
Returns the value of thedelayMs
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.long
Returns the value of themaxDelayMs
record component.int
Returns the value of themultiplier
record component.int
Returns the value of theretryCount
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Constructor Details
-
RetryPolicy
public RetryPolicy(HandlerConfig.RetryPolicy.Type type, int retryCount, long delayMs, long maxDelayMs, int multiplier, boolean abort) Creates an instance of aRetryPolicy
record class.- Parameters:
type
- the value for thetype
record componentretryCount
- the value for theretryCount
record componentdelayMs
- the value for thedelayMs
record componentmaxDelayMs
- the value for themaxDelayMs
record componentmultiplier
- the value for themultiplier
record componentabort
- the value for theabort
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
retryCount
public int retryCount()Returns the value of theretryCount
record component.- Returns:
- the value of the
retryCount
record component
-
delayMs
public long delayMs()Returns the value of thedelayMs
record component.- Returns:
- the value of the
delayMs
record component
-
maxDelayMs
public long maxDelayMs()Returns the value of themaxDelayMs
record component.- Returns:
- the value of the
maxDelayMs
record component
-
multiplier
public int multiplier()Returns the value of themultiplier
record component.- Returns:
- the value of the
multiplier
record component
-
abort
public boolean abort()Returns the value of theabort
record component.- Returns:
- the value of the
abort
record component
-