This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch feature/document-immutability-of-jobs
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-api.git

commit a867120bfa44537b9c3d04d51f1d85608b9ecc00
Author: Konrad Windszus <[email protected]>
AuthorDate: Wed Aug 13 12:03:03 2025 +0200

    Document that Job objects are immutable
---
 src/main/java/org/apache/sling/event/jobs/Job.java | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/sling/event/jobs/Job.java 
b/src/main/java/org/apache/sling/event/jobs/Job.java
index a6065b9..3c03e59 100644
--- a/src/main/java/org/apache/sling/event/jobs/Job.java
+++ b/src/main/java/org/apache/sling/event/jobs/Job.java
@@ -25,10 +25,14 @@ import org.osgi.annotation.versioning.ProviderType;
 
 
 /**
- * A job
+ * A job encapsulates a task to be or already processed by a job consumer. 
+ * It exposes metadata in form of properties.
+ * A job is <strong>immutable</strong>, meaning that once created the 
properties/state of the job while not be changed.
+ * (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 no rely on it).
+ * <p>
  *
- *
- * Property Types
+ * <h1>Property Types</h1>
  *
  * In general all scalar types and all serializable classes are supported as
  * property types. However, in order for deseralizing classes these must be
@@ -41,7 +45,7 @@ import org.osgi.annotation.versioning.ProviderType;
  * for this behavior as it only supports long but neither integer nor short.
  * Therefore if you are dealing with numbers, use the {@link 
#getProperty(String, Class)}
  * method to get the correct type instead of directly casting it.
- *
+ * 
  * @since 1.2
  */
 @ProviderType

Reply via email to