Package org.apache.openejb.threads.task

Examples of org.apache.openejb.threads.task.CURunnable.taskSubmitted()


    @Override
    public ScheduledFuture<?> scheduleAtFixedRate(final Runnable command, final long initialDelay, final long period, final TimeUnit unit) {
        final CURunnable wrapper = new CURunnable(command);
        final ScheduledFuture<?> future = delegate.scheduleAtFixedRate(wrapper, initialDelay, period, unit);
        wrapper.taskSubmitted(future, this, command);
        return new CUScheduleFuture<Object>(ScheduledFuture.class.cast(future), wrapper);
    }

    @Override
    public ScheduledFuture<?> scheduleWithFixedDelay(final Runnable command, final long initialDelay, final long delay, final TimeUnit unit) {
View Full Code Here


    @Override
    public ScheduledFuture<?> scheduleWithFixedDelay(final Runnable command, final long initialDelay, final long delay, final TimeUnit unit) {
        final CURunnable wrapper = new CURunnable(command);
        final ScheduledFuture<?> future = delegate.scheduleWithFixedDelay(wrapper, initialDelay, delay, unit);
        wrapper.taskSubmitted(future, this, command);
        return new CUScheduleFuture<Object>(ScheduledFuture.class.cast(future), wrapper);
    }

    public static long nowMs() {
        return System.currentTimeMillis(); // need to be comparable to java.util.Date
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.