use of com.swiftmq.impl.routing.single.smqpr.CloseStageQueueRequest in project swiftmq-ce by iitsoftware.
the class StageQueue method process.
protected void process(Object[] bulk, int n) {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace(ctx.routingSwiftlet.getName(), "StageQueue/process, n=" + n);
for (int i = 0; i < n; i++) {
Request r = (Request) bulk[i];
if (r.getDumpId() == SMQRFactory.CLOSE_STAGE_QUEUE_REQ) {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace(ctx.routingSwiftlet.getName(), "StageQueue/receiving: " + r);
close();
Semaphore sem = ((CloseStageQueueRequest) r).getSemaphore();
if (sem != null)
sem.notifySingleWaiter();
return;
}
if (stage != null)
stage.process((Request) bulk[i]);
}
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace(ctx.routingSwiftlet.getName(), "StageQueue/process, done");
}
Aggregations