Record Class TriggerTaskCommand<T extends Serializable>
java.lang.Object
java.lang.Record
org.sterl.spring.persistent_tasks.api.event.TriggerTaskCommand<T>
- All Implemented Interfaces:
PersistentTasksEvent
public record TriggerTaskCommand<T extends Serializable>(Collection<AddTriggerRequest<T extends Serializable>> triggers)
extends Record
implements PersistentTasksEvent
An event to trigger one or multiple persistentTask executions
-
Constructor Summary
ConstructorsConstructorDescriptionTriggerTaskCommand
(Collection<AddTriggerRequest<T>> triggers) Creates an instance of aTriggerTaskCommand
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static <T extends Serializable>
TriggerTaskCommand<T> static <T extends Serializable>
TriggerTaskCommand<T> static <T extends Serializable>
TriggerTaskCommand<T> of
(Collection<AddTriggerRequest<T>> triggers) static <T extends Serializable>
TriggerTaskCommand<T> of
(AddTriggerRequest<T> trigger) static <T extends Serializable>
TriggerTaskCommand<T> of
(AddTriggerRequest<T>... triggers) int
size()
final String
toString()
Returns a string representation of this record class.triggers()
Returns the value of thetriggers
record component.
-
Constructor Details
-
TriggerTaskCommand
Creates an instance of aTriggerTaskCommand
record class.- Parameters:
triggers
- the value for thetriggers
record component
-
-
Method Details
-
size
public int size() -
of
-
of
public static <T extends Serializable> TriggerTaskCommand<T> of(String name, T state, String correlationId) -
of
public static <T extends Serializable> TriggerTaskCommand<T> of(Collection<AddTriggerRequest<T>> triggers) -
of
-
of
@SafeVarargs public static <T extends Serializable> TriggerTaskCommand<T> of(AddTriggerRequest<T>... triggers) -
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)
. -
triggers
Returns the value of thetriggers
record component.- Returns:
- the value of the
triggers
record component
-