org.crsh.util
Class LatchedFuture<V>

java.lang.Object
  extended by org.crsh.util.LatchedFuture<V>
All Implemented Interfaces:
Future<V>

public class LatchedFuture<V>
extends Object
implements Future<V>

Author:
Julien Viet

Constructor Summary
LatchedFuture()
           
LatchedFuture(V value)
           
 
Method Summary
 void addListener(FutureListener<V> listener)
           
 boolean cancel(boolean b)
           
 V get()
           
 V get(long l, TimeUnit timeUnit)
           
 boolean isCancelled()
           
 boolean isDone()
           
 void set(V value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LatchedFuture

public LatchedFuture()

LatchedFuture

public LatchedFuture(V value)
Method Detail

cancel

public boolean cancel(boolean b)
Specified by:
cancel in interface Future<V>

isCancelled

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

isDone

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

get

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

get

public V get(long l,
             TimeUnit timeUnit)
      throws InterruptedException,
             ExecutionException,
             TimeoutException
Specified by:
get in interface Future<V>
Throws:
InterruptedException
ExecutionException
TimeoutException

addListener

public void addListener(FutureListener<V> listener)

set

public void set(V value)


Copyright © 2011 eXo Platform SAS. All Rights Reserved.