| RunnableScheduledFuture.java |
1 /*
2 * %W% %E%
3 *
4 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
5 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6 */
7
8 package java.util.concurrent;
9
10 /**
11 * A {@link ScheduledFuture} that is {@link Runnable}. Successful
12 * execution of the <tt>run</tt> method causes completion of the
13 * <tt>Future</tt> and allows access to its results.
14 * @see FutureTask
15 * @see Executor
16 * @since 1.6
17 * @author Doug Lea
18 * @param <V> The result type returned by this Future's <tt>get</tt> method
19 */
20 public interface RunnableScheduledFuture<V> extends RunnableFuture<V>, ScheduledFuture<V> {
21
22 /**
23 * Returns true if this is a periodic task. A periodic task may
24 * re-run according to some schedule. A non-periodic task can be
25 * run only once.
26 *
27 * @return true if this task is periodic
28 */
29 boolean isPeriodic();
30 }
31