stefan-egli commented on code in PR #6:
URL: 
https://github.com/apache/sling-org-apache-sling-event-api/pull/6#discussion_r2280473912


##########
src/main/java/org/apache/sling/event/jobs/Job.java:
##########
@@ -25,10 +25,14 @@
 
 
 /**
- * A job
+ * A job encapsulates a task processed by a job consumer. The job may already 
be finished at the time a Job object is created.
+ * It exposes metadata in form of properties.
+ * A job is <strong>immutable</strong>, meaning that once created the 
properties/state of the job will not change.
+ * (In the edge case of the job being processed on the same instance some 
properties of the job instance might be updated
+ * but you should not rely on it).

Review Comment:
   Is this the case? IIUC then a `Job` - that can be retrieved via `getJobById` 
/ `findJobs` or created by `addJob` contain a snapshot of the properties at 
that time. After that moment, the particular `Job` instance indeed no longer 
changes. You'd have to get the `Job` afresh to get any update. Or am I missing 
something.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to