|
|
|
@@ -81,7 +81,7 @@ public abstract class Broadcast |
|
|
|
private Integer transactions; |
|
|
|
|
|
|
|
/** Instantaneous number of jobs being serviced by service provider */ |
|
|
|
private Integer serviceActivityCount; |
|
|
|
private int serviceActivityCount; |
|
|
|
|
|
|
|
/** Running count of successful jobs */ |
|
|
|
private int successCount; |
|
|
|
@@ -1159,6 +1159,7 @@ public abstract class Broadcast |
|
|
|
* @param batch |
|
|
|
* @param prerequisites |
|
|
|
* @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) |
|
|
|
throws EngineException; |
|
|
|
@@ -1175,7 +1176,7 @@ public abstract class Broadcast |
|
|
|
|
|
|
|
protected void updateServiceActivityCount(int increment) |
|
|
|
{ |
|
|
|
synchronized (serviceActivityCount) |
|
|
|
synchronized (readyQueue) |
|
|
|
{ |
|
|
|
serviceActivityCount += increment; |
|
|
|
if (increment < 0 && serviceActivityCount <= 0) |
|
|
|
@@ -1340,7 +1341,10 @@ public abstract class Broadcast |
|
|
|
|
|
|
|
public int getCompletedJobCount() |
|
|
|
{ |
|
|
|
synchronized(readyQueue) |
|
|
|
{ |
|
|
|
return jobsTotal - getRemainingJobCount() - serviceActivityCount; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public String getBroadcastType() { |
|
|
|
|