sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject svn commit: r1616122 - in /sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/stats: StatisticsImpl.java TopicStatisticsImpl.java
Date Wed, 06 Aug 2014 08:21:27 GMT
Author: rombert
Date: Wed Aug  6 08:21:27 2014
New Revision: 1616122

URL: http://svn.apache.org/r1616122
Log:
SLING-3824 - Unneeded volatile fields in StatisticsImpl and
TopicStatisticsImpl

Modified:
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/stats/StatisticsImpl.java
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/stats/TopicStatisticsImpl.java

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/stats/StatisticsImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/stats/StatisticsImpl.java?rev=1616122&r1=1616121&r2=1616122&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/stats/StatisticsImpl.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/stats/StatisticsImpl.java
Wed Aug  6 08:21:27 2014
@@ -25,36 +25,36 @@ import org.apache.sling.event.jobs.Stati
  */
 public class StatisticsImpl implements Statistics {
 
-    private volatile long startTime;
+    private long startTime;
 
-    private volatile long activeJobs;
+    private long activeJobs;
 
-    private volatile long queuedJobs;
+    private long queuedJobs;
 
-    private volatile long lastActivated = -1;
+    private long lastActivated = -1;
 
-    private volatile long lastFinished = -1;
+    private long lastFinished = -1;
 
-    private volatile long averageWaitingTime;
+    private long averageWaitingTime;
 
-    private volatile long averageProcessingTime;
+    private long averageProcessingTime;
 
-    private volatile long waitingTime;
+    private long waitingTime;
 
-    private volatile long processingTime;
+    private long processingTime;
 
-    private volatile long waitingCount;
+    private long waitingCount;
 
-    private volatile long processingCount;
+    private long processingCount;
 
-    private volatile long finishedJobs;
+    private long finishedJobs;
 
-    private volatile long failedJobs;
+    private long failedJobs;
 
-    private volatile long cancelledJobs;
+    private long cancelledJobs;
 
     public StatisticsImpl() {
-        this.startTime = System.currentTimeMillis();
+        this(System.currentTimeMillis());
     }
 
     public StatisticsImpl(final long startTime) {

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/stats/TopicStatisticsImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/stats/TopicStatisticsImpl.java?rev=1616122&r1=1616121&r2=1616122&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/stats/TopicStatisticsImpl.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/stats/TopicStatisticsImpl.java
Wed Aug  6 08:21:27 2014
@@ -27,27 +27,27 @@ public class TopicStatisticsImpl impleme
 
     private final String topic;
 
-    private volatile long lastActivated = -1;
+    private long lastActivated = -1;
 
-    private volatile long lastFinished = -1;
+    private long lastFinished = -1;
 
-    private volatile long averageWaitingTime;
+    private long averageWaitingTime;
 
-    private volatile long averageProcessingTime;
+    private long averageProcessingTime;
 
-    private volatile long waitingTime;
+    private long waitingTime;
 
-    private volatile long processingTime;
+    private long processingTime;
 
-    private volatile long waitingCount;
+    private long waitingCount;
 
-    private volatile long processingCount;
+    private long processingCount;
 
-    private volatile long finishedJobs;
+    private long finishedJobs;
 
-    private volatile long failedJobs;
+    private long failedJobs;
 
-    private volatile long cancelledJobs;
+    private long cancelledJobs;
 
     /** Constructor. */
     public TopicStatisticsImpl(final String topic) {



Mime
View raw message