Search in sources :

Example 1 with ScheduleRemoved

use of com.swiftmq.impl.scheduler.standard.po.ScheduleRemoved in project swiftmq-ce by iitsoftware.

the class SchedulerSwiftletImpl method removeTemporarySchedule.

public boolean removeTemporarySchedule(String name) {
    boolean rc = false;
    if (ctx.traceSpace.enabled)
        ctx.traceSpace.trace(getName(), "removeTemporarySchedule, name=" + name + " ...");
    Semaphore sem = new Semaphore();
    ScheduleRemoved po = new ScheduleRemoved(name, sem);
    ctx.scheduler.enqueue(po);
    sem.waitHere(1000);
    rc = po.isSuccess();
    if (ctx.traceSpace.enabled)
        ctx.traceSpace.trace(getName(), "removeTemporarySchedule, name=" + name + " done (rc=" + rc + ")");
    return rc;
}
Also used : Semaphore(com.swiftmq.tools.concurrent.Semaphore) ScheduleRemoved(com.swiftmq.impl.scheduler.standard.po.ScheduleRemoved)

Aggregations

ScheduleRemoved (com.swiftmq.impl.scheduler.standard.po.ScheduleRemoved)1 Semaphore (com.swiftmq.tools.concurrent.Semaphore)1