kwin commented on code in PR #6: URL: https://github.com/apache/sling-org-apache-sling-event-api/pull/6#discussion_r2283209003
########## 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: Right, I was confused by the fact that JobImpl has methods which modify the state like https://github.com/apache/sling-org-apache-sling-event/blob/c704d540570319e73301afdade23f4543ef034ff/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java#L255 or https://github.com/apache/sling-org-apache-sling-event/blob/c704d540570319e73301afdade23f4543ef034ff/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java#L315 but due to the fact that JobImpl objects are never shared but always newly created by the JobManager I think we can safely remove this sentence. -- 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: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org