com.hazelcast.spi.impl
Class AbstractCompletableFuture<V>

java.lang.Object
  extended by com.hazelcast.spi.impl.AbstractCompletableFuture<V>
All Implemented Interfaces:
ICompletableFuture<V>, Future<V>
Direct Known Subclasses:
TrackableJobFuture

public abstract class AbstractCompletableFuture<V>
extends Object
implements ICompletableFuture<V>


Field Summary
protected  NodeEngine nodeEngine
           
protected static Object NULL_VALUE
           
protected  Object result
           
protected  AtomicReferenceFieldUpdater<AbstractCompletableFuture,Object> resultUpdater
           
 
Constructor Summary
protected AbstractCompletableFuture(NodeEngine nodeEngine, ILogger logger)
           
 
Method Summary
 void andThen(ExecutionCallback<V> callback)
           
 void andThen(ExecutionCallback<V> callback, Executor executor)
           
protected  void fireCallbacks()
           
 V get()
           
protected  ExecutorService getAsyncExecutor()
           
protected  V getResult()
           
 boolean isDone()
           
 void setResult(Object result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.Future
cancel, get, isCancelled
 

Field Detail

NULL_VALUE

protected static final Object NULL_VALUE

resultUpdater

protected final AtomicReferenceFieldUpdater<AbstractCompletableFuture,Object> resultUpdater

nodeEngine

protected final NodeEngine nodeEngine

result

protected volatile Object result
Constructor Detail

AbstractCompletableFuture

protected AbstractCompletableFuture(NodeEngine nodeEngine,
                                    ILogger logger)
Method Detail

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>

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

setResult

public void setResult(Object result)

getResult

protected V getResult()

fireCallbacks

protected void fireCallbacks()

getAsyncExecutor

protected ExecutorService getAsyncExecutor()


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