/** * Returns a <tt>RunnableFuture</tt> for the given callable task. * * @param callable the callable task being wrapped * @return a <tt>RunnableFuture</tt> which when run will call the * underlying callable and which, as a <tt>Future</tt>, will yield * the callable's result as its result and provide for * cancellation of the underlying task. * @since 1.6 */ protected RunnableFuture newTaskFor(Callable callable) { return new FutureTask(callable); }
/** * Returns a <tt>RunnableFuture</tt> for the given callable task. * * @param callable the callable task being wrapped * @return a <tt>RunnableFuture</tt> which when run will call the * underlying callable and which, as a <tt>Future</tt>, will yield * the callable's result as its result and provide for * cancellation of the underlying task. * @since 1.6 */ protected RunnableFuture newTaskFor(Callable callable) { return new FutureTask(callable); }
/** * Returns a <tt>RunnableFuture</tt> for the given callable task. * * @param callable the callable task being wrapped * @return a <tt>RunnableFuture</tt> which when run will call the * underlying callable and which, as a <tt>Future</tt>, will yield * the callable's result as its result and provide for * cancellation of the underlying task. * @since 1.6 */ protected RunnableFuture newTaskFor(Callable callable) { return new FutureTask(callable); }
/** * Returns a <tt>RunnableFuture</tt> for the given runnable and default * value. * * @param runnable the runnable task being wrapped * @param value the default value for the returned future * @return a <tt>RunnableFuture</tt> which when run will run the * underlying runnable and which, as a <tt>Future</tt>, will yield * the given value as its result and provide for cancellation of * the underlying task. * @since 1.6 */ protected RunnableFuture newTaskFor(Runnable runnable, Object value) { return new FutureTask(runnable, value); }
/** * Returns a <tt>RunnableFuture</tt> for the given runnable and default * value. * * @param runnable the runnable task being wrapped * @param value the default value for the returned future * @return a <tt>RunnableFuture</tt> which when run will run the * underlying runnable and which, as a <tt>Future</tt>, will yield * the given value as its result and provide for cancellation of * the underlying task. * @since 1.6 */ protected RunnableFuture newTaskFor(Runnable runnable, Object value) { return new FutureTask(runnable, value); }
/** * Returns a <tt>RunnableFuture</tt> for the given runnable and default * value. * * @param runnable the runnable task being wrapped * @param value the default value for the returned future * @return a <tt>RunnableFuture</tt> which when run will run the * underlying runnable and which, as a <tt>Future</tt>, will yield * the given value as its result and provide for cancellation of * the underlying task. * @since 1.6 */ protected RunnableFuture newTaskFor(Runnable runnable, Object value) { return new FutureTask(runnable, value); }
private RunnableFuture newTaskFor(Callable task) { if (aes == null) return new FutureTask(task); else return aes.newTaskFor(task); }
private RunnableFuture newTaskFor(Callable task) { if (aes == null) return new FutureTask(task); else return aes.newTaskFor(task); }
private RunnableFuture newTaskFor(Runnable task, Object result) { if (aes == null) return new FutureTask(task, result); else return aes.newTaskFor(task, result); }
private RunnableFuture newTaskFor(Runnable task, Object result) { if (aes == null) return new FutureTask(task, result); else return aes.newTaskFor(task, result); }
private RunnableFuture newTaskFor(Callable task) { if (aes == null) return new FutureTask(task); else return aes.newTaskFor(task); }
private RunnableFuture newTaskFor(Runnable task, Object result) { if (aes == null) return new FutureTask(task, result); else return aes.newTaskFor(task, result); }