Class ScheduleId
java.lang.Object
io.fluxzero.sdk.scheduling.ScheduleId
Represents a unique identifier for a schedule, consisting of a type and an id. It is simply a convenience class
used to prevent clashes between schedule ids, e.g.: two functionally different schedules involving the same entity
id.
This class is typically used to encapsulate and uniquely identify schedules within a system. The combination of type and id can be used to distinguish between different schedule categories or instances.
Note: when a ScheduleId is used to schedule a message the scheduler actually persists the schedule with a String
schedule obtained via toString().
ScheduleIds can be used as-is or extended to form strongly typed schedule ids:
public class TaskExpiryId extends ScheduleId {
public TaskExpiryId(TaskId taskId) {
super("task-expiry", taskId);
}
}
-
Constructor Summary
ConstructorsConstructorDescriptionScheduleId(String type, Object id) Constructs a new ScheduleId object using the specified type and identifier. -
Method Summary
-
Constructor Details
-
ScheduleId
Constructs a new ScheduleId object using the specified type and identifier.- Parameters:
type- the type or category associated with the schedule. This parameter is used to distinguish schedules based on their broader classifications (e.g., "task", "booking"). It must be a non-null string and should provide context about the nature of the schedule.id- the unique identifier for the schedule. This parameter is used to uniquely identify a specific schedule instance within the specified type. If the provided id is an instance of theIdclass, its functional ID is extracted, otherwise thetoString()value of the id is used.
-
-
Method Details
-
toString
-