Class JobCancelled
- All Implemented Interfaces:
LifecycleEvent, TerminalEvent, JobEvent, Serializable
Event published when a job is cancelled by explicit request.
Not a FailureEvent - cancellation is a deliberate decision to stop,
not a failure to complete. Carries whether the stop was forced; its message is
Job cancelled or Job forcefully cancelled. For a job cancelled while still
queued, the dispatcher builds the event with the remover's message through the
message-taking constructor, never by mutating a built event: Cancelled while
queued: <reason> from a cancel by id, Workflow cancelled: <reason> from a workflow
cancel, Cancelled by shutdown at shutdown.
- Since:
- 0.1 (2025-09-11)
- Author:
- Andrey Santrosyan
- See Also:
-
Field Summary
Fields inherited from class AbstractTerminalEvent
attempts, llmResponses, metadata, terminatedAt -
Constructor Summary
ConstructorsConstructorDescriptionJobCancelled(JobSnapshot snapshot, boolean force, int attempts, List<LLMResponse<?>> llmResponses, Map<String, Object> metadata) JobCancelled(JobSnapshot snapshot, boolean force, String message, int attempts, List<LLMResponse<?>> llmResponses, Map<String, Object> metadata) A cancellation whose message the publisher states at construction, as the dispatcher does for a job cancelled while still queued. -
Method Summary
Methods inherited from class AbstractTerminalEvent
getAttempts, getCompletionTime, getDuration, getLlmResponses, getMetadata, getResult, getStartTime, getTerminatedAtMethods inherited from class AbstractJobEvent
message, setMessage, snapshot, timestampMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TerminalEvent
getCause, getErrorMessage, getErrorType
-
Constructor Details
-
JobCancelled
public JobCancelled(JobSnapshot snapshot, boolean force, int attempts, List<LLMResponse<?>> llmResponses, Map<String, Object> metadata) -
JobCancelled
public JobCancelled(JobSnapshot snapshot, boolean force, String message, int attempts, List<LLMResponse<?>> llmResponses, Map<String, Object> metadata) A cancellation whose message the publisher states at construction, as the dispatcher does for a job cancelled while still queued.
-
-
Method Details
-
force
public boolean force()
-