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 Details

  • Constructor Details

    • MultiTenantStreamingProcessorRestartConfiguration

      public MultiTenantStreamingProcessorRestartConfiguration(Duration restartTimeout)
      Compact constructor validating that the given restartTimeout is a positive Duration.
  • Method Details

    • restartTimeout

      public MultiTenantStreamingProcessorRestartConfiguration restartTimeout(Duration 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • restartTimeout

      public Duration restartTimeout()
      Returns the value of the restartTimeout record component.
      Returns:
      the value of the restartTimeout record component