Document that Job objects are immutable#6
Conversation
a867120 to
415496a
Compare
415496a to
3684a5d
Compare
|
| * (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). |
There was a problem hiding this 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.
There was a problem hiding this 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.
|



No description provided.