| @@ -13,6 +13,7 @@ import java.util.concurrent.LinkedBlockingQueue; | |||||
| import java.util.concurrent.ScheduledExecutorService; | import java.util.concurrent.ScheduledExecutorService; | ||||
| import java.util.concurrent.ScheduledFuture; | import java.util.concurrent.ScheduledFuture; | ||||
| import java.util.concurrent.TimeUnit; | import java.util.concurrent.TimeUnit; | ||||
| import java.util.concurrent.atomic.AtomicInteger; | |||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
| @@ -88,7 +89,7 @@ public abstract class Broadcast | |||||
| /** Running count of successful jobs */ | /** Running count of successful jobs */ | ||||
| private int successCount; | |||||
| private AtomicInteger successCount; | |||||
| public static enum BroadcastState | public static enum BroadcastState | ||||
| @@ -402,6 +403,7 @@ public abstract class Broadcast | |||||
| this.jobReportRootNodeName = jobReportRootNodeName; | this.jobReportRootNodeName = jobReportRootNodeName; | ||||
| postback = null; | postback = null; | ||||
| successCount = new AtomicInteger(0); | |||||
| sleepBetweenJobs = SLEEP_BETWEEN_JOBS_DEFAULT; | sleepBetweenJobs = SLEEP_BETWEEN_JOBS_DEFAULT; | ||||
| readyQueue = new LinkedBlockingQueue<Job>(); | readyQueue = new LinkedBlockingQueue<Job>(); | ||||
| serviceThreadPool = new ArrayList<Service>(); | serviceThreadPool = new ArrayList<Service>(); | ||||
| @@ -879,7 +881,7 @@ public abstract class Broadcast | |||||
| } | } | ||||
| } | } | ||||
| statusBf.append("<transactions>" + transactions + "</transactions>"); | statusBf.append("<transactions>" + transactions + "</transactions>"); | ||||
| statusBf.append("<success>" + successCount + "</success>"); | |||||
| statusBf.append("<success>" + successCount.intValue() + "</success>"); | |||||
| statusBf.append("<job_summary completed='" + getCompletedJobCount() + | statusBf.append("<job_summary completed='" + getCompletedJobCount() + | ||||
| "' ready='" + getPendingJobCount() + "'"); | "' ready='" + getPendingJobCount() + "'"); | ||||
| statusBf.append(" active='" + getActiveJobCount() + "'"); | statusBf.append(" active='" + getActiveJobCount() + "'"); | ||||
| @@ -1206,7 +1208,7 @@ public abstract class Broadcast | |||||
| */ | */ | ||||
| protected void postJobStatus(Job job, long rescheduleTimeMS) | protected void postJobStatus(Job job, long rescheduleTimeMS) | ||||
| { | { | ||||
| if (job.jobStatus == JobStatus.SUCCESS) successCount++; | |||||
| if (job.jobStatus == JobStatus.SUCCESS) successCount.incrementAndGet(); | |||||
| if (postback != null) | if (postback != null) | ||||
| { | { | ||||
| JobReport report = mkJobReport(); | JobReport report = mkJobReport(); | ||||