org.jcodec.common
Class PriorityFuture<T>

java.lang.Object
  extended by org.jcodec.common.PriorityFuture<T>
All Implemented Interfaces:
Runnable, Future<T>, RunnableFuture<T>

public class PriorityFuture<T>
extends Object
implements RunnableFuture<T>


Field Summary
static Comparator<Runnable> COMP
           
 
Constructor Summary
PriorityFuture(RunnableFuture<T> other, int priority)
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 T get()
           
 T get(long timeout, TimeUnit unit)
           
 int getPriority()
           
 boolean isCancelled()
           
 boolean isDone()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMP

public static Comparator<Runnable> COMP
Constructor Detail

PriorityFuture

public PriorityFuture(RunnableFuture<T> other,
                      int priority)
Method Detail

getPriority

public int getPriority()

cancel

public boolean cancel(boolean mayInterruptIfRunning)
Specified by:
cancel in interface Future<T>

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface Future<T>

isDone

public boolean isDone()
Specified by:
isDone in interface Future<T>

get

public T get()
      throws InterruptedException,
             ExecutionException
Specified by:
get in interface Future<T>
Throws:
InterruptedException
ExecutionException

get

public T get(long timeout,
             TimeUnit unit)
      throws InterruptedException,
             ExecutionException,
             TimeoutException
Specified by:
get in interface Future<T>
Throws:
InterruptedException
ExecutionException
TimeoutException

run

public void run()
Specified by:
run in interface Runnable
Specified by:
run in interface RunnableFuture<T>


Copyright © 2013. All Rights Reserved.