Record Class EventHandlingProperties.ProcessorSettings.LifeCycle
java.lang.Object
java.lang.Record
com.opencqrs.framework.eventhandler.EventHandlingProperties.ProcessorSettings.LifeCycle
- Record Components:
autoStart- Whether the event handling processor shall be started automatically.controller- The built-in life-cycle controller to use, unless "controller-registration" is specified. Defaults to "leader-election", if a unique "lock-registry" bean is available within the application context, "application-context" otherwise.controllerRegistration- CustomEventHandlingProcessorLifecycleRegistrationbean reference to use.lockRegistry- Custom lock registry to use, if "leader-election" applies.partitions- The number of parallel instances (partitions) to start for this event processor. It is important to note, that partitioning ofEventHandlingProcessors cannot be changed later, unless the processor is completely transient, i.e. it's side-effects are completely idempotent and no persistent progress tracking is needed. In all other cases, starting a partitioned processor results in partitionedEventHandlingProperties.ProcessorSettings.Progressand parallel processing will proceed the progress independently according to the configuredEventHandlingProperties.ProcessorSettings.Sequencing. Hence, reducing or increasing the number of partitions must only be performed administratively, while all instances are stopped and have the same progress. Furthermore, persistent progress needs to be duplicated for new partitions, manually.
- Enclosing class:
EventHandlingProperties.ProcessorSettings
public static record EventHandlingProperties.ProcessorSettings.LifeCycle(Boolean autoStart, EventHandlingProperties.ProcessorSettings.LifeCycle.Controller controller, String controllerRegistration, String lockRegistry, Long partitions)
extends Record
Configures life-cycle registration.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe built-inEventHandlingProcessorLifecycleControllertype. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theautoStartrecord component.Returns the value of thecontrollerrecord component.Returns the value of thecontrollerRegistrationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelockRegistryrecord component.Returns the value of thepartitionsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LifeCycle
public LifeCycle(Boolean autoStart, EventHandlingProperties.ProcessorSettings.LifeCycle.Controller controller, String controllerRegistration, String lockRegistry, Long partitions) Creates an instance of aLifeCyclerecord class.- Parameters:
autoStart- the value for theautoStartrecord componentcontroller- the value for thecontrollerrecord componentcontrollerRegistration- the value for thecontrollerRegistrationrecord componentlockRegistry- the value for thelockRegistryrecord componentpartitions- the value for thepartitionsrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
autoStart
Returns the value of theautoStartrecord component.- Returns:
- the value of the
autoStartrecord component
-
controller
Returns the value of thecontrollerrecord component.- Returns:
- the value of the
controllerrecord component
-
controllerRegistration
Returns the value of thecontrollerRegistrationrecord component.- Returns:
- the value of the
controllerRegistrationrecord component
-
lockRegistry
Returns the value of thelockRegistryrecord component.- Returns:
- the value of the
lockRegistryrecord component
-
partitions
Returns the value of thepartitionsrecord component.- Returns:
- the value of the
partitionsrecord component
-