| @@ -81,7 +81,7 @@ public abstract class Broadcast | |||||
| private Integer transactions; | private Integer transactions; | ||||
| /** Instantaneous number of jobs being serviced by service provider */ | /** Instantaneous number of jobs being serviced by service provider */ | ||||
| private Integer serviceActivityCount; | |||||
| private int serviceActivityCount; | |||||
| /** Running count of successful jobs */ | /** Running count of successful jobs */ | ||||
| private int successCount; | private int successCount; | ||||
| @@ -1159,6 +1159,7 @@ public abstract class Broadcast | |||||
| * @param batch | * @param batch | ||||
| * @param prerequisites | * @param prerequisites | ||||
| * @return int - number of transactions employed to service these jobs. | * @return int - number of transactions employed to service these jobs. | ||||
| * @throw Exception to abort broadcast | |||||
| */ | */ | ||||
| abstract protected int processJobs(List<Job> batch, Object serviceProvider, ServicePrerequisites prerequisites) | abstract protected int processJobs(List<Job> batch, Object serviceProvider, ServicePrerequisites prerequisites) | ||||
| throws EngineException; | throws EngineException; | ||||
| @@ -1175,7 +1176,7 @@ public abstract class Broadcast | |||||
| protected void updateServiceActivityCount(int increment) | protected void updateServiceActivityCount(int increment) | ||||
| { | { | ||||
| synchronized (serviceActivityCount) | |||||
| synchronized (readyQueue) | |||||
| { | { | ||||
| serviceActivityCount += increment; | serviceActivityCount += increment; | ||||
| if (increment < 0 && serviceActivityCount <= 0) | if (increment < 0 && serviceActivityCount <= 0) | ||||
| @@ -1340,7 +1341,10 @@ public abstract class Broadcast | |||||
| public int getCompletedJobCount() | public int getCompletedJobCount() | ||||
| { | { | ||||
| synchronized(readyQueue) | |||||
| { | |||||
| return jobsTotal - getRemainingJobCount() - serviceActivityCount; | return jobsTotal - getRemainingJobCount() - serviceActivityCount; | ||||
| } | |||||
| } | } | ||||
| public String getBroadcastType() { | public String getBroadcastType() { | ||||