Package org.apache.openejb.concurrencyutilities.ee.task

Examples of org.apache.openejb.concurrencyutilities.ee.task.TriggerRunnable


    @Override
    public ScheduledFuture<?> schedule(final Runnable runnable, final Trigger trigger) {
        final Date taskScheduledTime = new Date();
        final AtomicReference<Future<?>> futureHandle = new AtomicReference<Future<?>>();
        final TriggerRunnable wrapper = new TriggerRunnable(this, runnable, new CURunnable(runnable), trigger, taskScheduledTime, getTaskId(runnable), AtomicReference.class.cast(futureHandle));
        final ScheduledFuture<?> future = delegate.schedule(wrapper, trigger.getNextRunTime(wrapper.getLastExecution(), taskScheduledTime).getTime() - nowMs(), TimeUnit.MILLISECONDS);
        return initTriggerScheduledFuture(runnable, AtomicReference.class.cast(futureHandle), wrapper, ScheduledFuture.class.cast(future));
    }
View Full Code Here


    @Override
    public ScheduledFuture<?> schedule(final Runnable runnable, final Trigger trigger) {
        final Date taskScheduledTime = new Date();
        final AtomicReference<Future<?>> futureHandle = new AtomicReference<Future<?>>();
        final TriggerRunnable wrapper = new TriggerRunnable(this, runnable, new CURunnable(runnable), trigger, taskScheduledTime, getTaskId(runnable), AtomicReference.class.cast(futureHandle));
        final ScheduledFuture<?> future = delegate.schedule(wrapper, trigger.getNextRunTime(wrapper.getLastExecution(), taskScheduledTime).getTime() - nowMs(), TimeUnit.MILLISECONDS);
        return initTriggerScheduledFuture(runnable, AtomicReference.class.cast(futureHandle), wrapper, ScheduledFuture.class.cast(future));
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.concurrencyutilities.ee.task.TriggerRunnable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.