com.hazelcast.util.executor
Class DelegatingFuture<V>

java.lang.Object
  extended by com.hazelcast.util.executor.DelegatingFuture<V>
All Implemented Interfaces:
ICompletableFuture<V>, Future<V>
Direct Known Subclasses:
ClientCancellableDelegatingFuture

public class DelegatingFuture<V>
extends Object
implements ICompletableFuture<V>


Field Summary
protected  ICompletableFuture future
           
 
Constructor Summary
DelegatingFuture(ICompletableFuture future, SerializationService serializationService)
           
DelegatingFuture(ICompletableFuture future, SerializationService serializationService, V defaultValue)
           
 
Method Summary
 void andThen(ExecutionCallback<V> callback)
           
 void andThen(ExecutionCallback<V> callback, Executor executor)
           
 boolean cancel(boolean mayInterruptIfRunning)
           
 V get()
           
 V get(long timeout, TimeUnit unit)
           
 boolean isCancelled()
           
 boolean isDone()
           
protected  void setDone()
           
protected  void setError(Throwable error)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

future

protected final ICompletableFuture future
Constructor Detail

DelegatingFuture

public DelegatingFuture(ICompletableFuture future,
                        SerializationService serializationService)

DelegatingFuture

public DelegatingFuture(ICompletableFuture future,
                        SerializationService serializationService,
                        V defaultValue)
Method Detail

get

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

get

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

cancel

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

isCancelled

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

isDone

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

setError

protected void setError(Throwable error)

setDone

protected void setDone()

andThen

public void andThen(ExecutionCallback<V> callback)
Specified by:
andThen in interface ICompletableFuture<V>

andThen

public void andThen(ExecutionCallback<V> callback,
                    Executor executor)
Specified by:
andThen in interface ICompletableFuture<V>


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.