org.jgroups.util
Class DefaultTimeScheduler.TaskWrapper<V>

java.lang.Object
  extended by org.jgroups.util.DefaultTimeScheduler.TaskWrapper<V>
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future<V>
Enclosing class:
DefaultTimeScheduler

protected class DefaultTimeScheduler.TaskWrapper<V>
extends java.lang.Object
implements java.lang.Runnable, java.util.concurrent.Future<V>


Constructor Summary
DefaultTimeScheduler.TaskWrapper(TimeScheduler.Task task)
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 void doSchedule()
           
 V get()
           
 V get(long timeout, java.util.concurrent.TimeUnit unit)
           
 java.util.concurrent.Future<?> getFuture()
           
 boolean isCancelled()
           
 boolean isDone()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTimeScheduler.TaskWrapper

public DefaultTimeScheduler.TaskWrapper(TimeScheduler.Task task)
Method Detail

getFuture

public java.util.concurrent.Future<?> getFuture()

run

public void run()
Specified by:
run in interface java.lang.Runnable

doSchedule

public void doSchedule()

cancel

public boolean cancel(boolean mayInterruptIfRunning)
Specified by:
cancel in interface java.util.concurrent.Future<V>

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface java.util.concurrent.Future<V>

isDone

public boolean isDone()
Specified by:
isDone in interface java.util.concurrent.Future<V>

get

public V get()
      throws java.lang.InterruptedException,
             java.util.concurrent.ExecutionException
Specified by:
get in interface java.util.concurrent.Future<V>
Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException

get

public V get(long timeout,
             java.util.concurrent.TimeUnit unit)
      throws java.lang.InterruptedException,
             java.util.concurrent.ExecutionException,
             java.util.concurrent.TimeoutException
Specified by:
get in interface java.util.concurrent.Future<V>
Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.