org.infinispan.client.hotrod.impl.async
Class NotifyingFutureImpl<T>

java.lang.Object
  extended by org.infinispan.client.hotrod.impl.async.NotifyingFutureImpl<T>
All Implemented Interfaces:
Future<T>, NotifyingFuture<T>

public class NotifyingFutureImpl<T>
extends Object
implements NotifyingFuture<T>

Notifying future implementation for async calls.

Since:
4.1
Author:
Mircea.Markus@jboss.com

Constructor Summary
NotifyingFutureImpl()
           
 
Method Summary
 NotifyingFuture<T> attachListener(FutureListener futureListener)
          Attaches a listener and returns the same future instance, to allow for 'building'.
 boolean cancel(boolean mayInterruptIfRunning)
           
 T get()
           
 T get(long timeout, TimeUnit unit)
           
 boolean isCancelled()
           
 boolean isDone()
           
 void notifyFutureCompletion()
           
 void setExecuting(Future<T> executing)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotifyingFutureImpl

public NotifyingFutureImpl()
Method Detail

setExecuting

public void setExecuting(Future<T> executing)

attachListener

public NotifyingFuture<T> attachListener(FutureListener futureListener)
Description copied from interface: NotifyingFuture
Attaches a listener and returns the same future instance, to allow for 'building'.

Specified by:
attachListener in interface NotifyingFuture<T>
Parameters:
futureListener - listener to attach
Returns:
the same future instance

cancel

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

notifyFutureCompletion

public void notifyFutureCompletion()

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

-->

Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.