joerghoh commented on code in PR #24:
URL: 
https://github.com/apache/sling-org-apache-sling-event/pull/24#discussion_r1122980785


##########
src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java:
##########
@@ -150,6 +156,11 @@ static JobManagerConfiguration 
newForTest(ResourceResolverFactory resourceResolv
 
     private volatile long startupDelay;
 
+    /**
+     * The max count of job progress log messages
+     */
+    private int progressLogCount;

Review Comment:
   I would suggest to name it ```progressLogMaxCount``` to make it clearer.



##########
src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java:
##########
@@ -92,6 +92,12 @@ public class JobManagerConfiguration {
             description = "Specify the periodic interval in minutes (default 
is 48h - use 0 to disable) after which " +
                     "removed jobs (ERROR or DROPPED) should be cleaned from 
the repository.")
         int cleanup_period() default 2880;
+
+        @AttributeDefinition(name = "Progress Log message's max count",
+                description = "Max number of log messages that can stored by 
consumer to add information about current state of Job.\n" +
+                        "Any attempt to add more information would result into 
purging of the least recent messages." +
+                        "default is -1 (to indicate infinite).")
+        int progresslog_count() default -1;

Review Comment:
   ```suggestion
           int progresslog_maxCount() default -1;
   ```



##########
src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java:
##########
@@ -312,14 +318,18 @@ public String update(final long eta) {
 
     public String log(final String message, final Object... args) {
         final String logEntry = MessageFormat.format(message, args);
-        final String[] entries = 
this.getProperty(Job.PROPERTY_JOB_PROGRESS_LOG, String[].class);
+        final ArrayDeque<String> entries = 
this.getProperty(Job.PROPERTY_JOB_PROGRESS_LOG, ArrayDeque.class);

Review Comment:
   is this change backwards compatible? Is it possible to read properties of 
jobs, which have been written with a ```String[]``` value in here?



-- 
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