Record Class MultiTenantStreamingProcessorRestartConfiguration
java.lang.Object
java.lang.Record
io.axoniq.framework.messaging.multitenancy.configuration.MultiTenantStreamingProcessorRestartConfiguration
- Record Components:
restartTimeout- the safety-net timeout bounding each processor's shutdown-and-start during a restart, so a processor that never completes its shutdown or start cannot block the restart thread
public record MultiTenantStreamingProcessorRestartConfiguration(Duration restartTimeout)
extends Record
Configuration for the
MultiTenantStreamingProcessorRestarter.
Register a customized instance to modify how the running streaming event processors are restarted when the set of
tenants changes. The DEFAULT is registered automatically, so a customized instance is only needed to
deviate from it.
- Since:
- 5.3.0
- Author:
- Laura Devriendt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MultiTenantStreamingProcessorRestartConfigurationA default instance of theMultiTenantStreamingProcessorRestartConfiguration, setting therestartTimeout()to 30 seconds. -
Constructor Summary
ConstructorsConstructorDescriptionMultiTenantStreamingProcessorRestartConfiguration(Duration restartTimeout) Compact constructor validating that the givenrestartTimeoutis a positiveDuration. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of therestartTimeoutrecord component.restartTimeout(Duration restartTimeout) Sets the safety-net timeout bounding each processor's shutdown-and-start during a restart.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
A default instance of theMultiTenantStreamingProcessorRestartConfiguration, setting therestartTimeout()to 30 seconds.
-
-
Constructor Details
-
MultiTenantStreamingProcessorRestartConfiguration
Compact constructor validating that the givenrestartTimeoutis a positiveDuration.
-
-
Method Details
-
restartTimeout
Sets the safety-net timeout bounding each processor's shutdown-and-start during a restart. Raise it for a deployment whose streaming event processors are slow to stop and start. Defaults to 30 seconds.- Parameters:
restartTimeout- the timeout bounding each processor's restart- Returns:
- a copy of this configuration using the given
restartTimeout
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
restartTimeout
Returns the value of therestartTimeoutrecord component.- Returns:
- the value of the
restartTimeoutrecord component
-