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<TriggerRequest<T extends Serializable>> triggers)
extends Record
implements PersistentTasksEvent
An event to trigger one or multiple persistentTask executions
-
Constructor Summary
ConstructorsConstructorDescriptionTriggerTaskCommand(Collection<TriggerRequest<T>> triggers) Creates an instance of aTriggerTaskCommandrecord class. -
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.static <T extends Serializable>
TriggerTaskCommand<T> static <T extends Serializable>
TriggerTaskCommand<T> static <T extends Serializable>
TriggerTaskCommand<T> of(Collection<TriggerRequest<T>> triggers) static <T extends Serializable>
TriggerTaskCommand<T> of(TriggerRequest<T> trigger) static <T extends Serializable>
TriggerTaskCommand<T> of(TriggerRequest<T>... triggers) intsize()final StringtoString()Returns a string representation of this record class.triggers()Returns the value of thetriggersrecord component.
-
Constructor Details
-
TriggerTaskCommand
Creates an instance of aTriggerTaskCommandrecord class.- Parameters:
triggers- the value for thetriggersrecord 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<TriggerRequest<T>> triggers) -
of
-
of
@SafeVarargs public static <T extends Serializable> TriggerTaskCommand<T> of(TriggerRequest<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 thetriggersrecord component.- Returns:
- the value of the
triggersrecord component
-