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
- CustomEventHandlingProcessorLifecycleRegistration
bean 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 ofEventHandlingProcessor
s 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.Progress
and 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 enum
The built-inEventHandlingProcessorLifecycleController
type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theautoStart
record component.Returns the value of thecontroller
record component.Returns the value of thecontrollerRegistration
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.Returns the value of thelockRegistry
record component.Returns the value of thepartitions
record component.final String
toString()
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 aLifeCycle
record class.- Parameters:
autoStart
- the value for theautoStart
record componentcontroller
- the value for thecontroller
record componentcontrollerRegistration
- the value for thecontrollerRegistration
record componentlockRegistry
- the value for thelockRegistry
record componentpartitions
- the value for thepartitions
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
autoStart
Returns the value of theautoStart
record component.- Returns:
- the value of the
autoStart
record component
-
controller
Returns the value of thecontroller
record component.- Returns:
- the value of the
controller
record component
-
controllerRegistration
Returns the value of thecontrollerRegistration
record component.- Returns:
- the value of the
controllerRegistration
record component
-
lockRegistry
Returns the value of thelockRegistry
record component.- Returns:
- the value of the
lockRegistry
record component
-
partitions
Returns the value of thepartitions
record component.- Returns:
- the value of the
partitions
record component
-