use of com.swiftmq.impl.routing.single.schedule.po.POCloseObject in project swiftmq-ce by iitsoftware.
the class DefaultScheduler method close.
public void close() {
// debug ctx.timerSwiftlet.removeTimerListener(tl);
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace(ctx.routingSwiftlet.getName(), toString() + "/close ...");
synchronized (this) {
if (closed)
return;
for (Iterator iter = connections.iterator(); iter.hasNext(); ) {
ConnectionEntry entry = (ConnectionEntry) iter.next();
iter.remove();
connectionRemoved(entry.getRoutingConnection());
}
}
Semaphore sem = new Semaphore();
enqueueClose(new POCloseObject(null, sem));
sem.waitHere();
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace(ctx.routingSwiftlet.getName(), toString() + "/close done");
}
Aggregations