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 aRetryPolicyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanabort()Returns the value of theabortrecord component.longdelayMs()Returns the value of thedelayMsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of themaxDelayMsrecord component.intReturns the value of themultiplierrecord component.intReturns the value of theretryCountrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
RetryPolicy
public RetryPolicy(HandlerConfig.RetryPolicy.Type type, int retryCount, long delayMs, long maxDelayMs, int multiplier, boolean abort) Creates an instance of aRetryPolicyrecord class.- Parameters:
type- the value for thetyperecord componentretryCount- the value for theretryCountrecord componentdelayMs- the value for thedelayMsrecord componentmaxDelayMs- the value for themaxDelayMsrecord componentmultiplier- the value for themultiplierrecord componentabort- the value for theabortrecord 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 thetyperecord component.- Returns:
- the value of the
typerecord component
-
retryCount
public int retryCount()Returns the value of theretryCountrecord component.- Returns:
- the value of the
retryCountrecord component
-
delayMs
public long delayMs()Returns the value of thedelayMsrecord component.- Returns:
- the value of the
delayMsrecord component
-
maxDelayMs
public long maxDelayMs()Returns the value of themaxDelayMsrecord component.- Returns:
- the value of the
maxDelayMsrecord component
-
multiplier
public int multiplier()Returns the value of themultiplierrecord component.- Returns:
- the value of the
multiplierrecord component
-
abort
public boolean abort()Returns the value of theabortrecord component.- Returns:
- the value of the
abortrecord component
-