com.hazelcast.client.util
Class ClientCancellableDelegatingFuture<V>

java.lang.Object
  extended by com.hazelcast.util.executor.DelegatingFuture<V>
      extended by com.hazelcast.client.util.ClientCancellableDelegatingFuture<V>
Type Parameters:
V -
All Implemented Interfaces:
ICompletableFuture<V>, Future<V>

public final class ClientCancellableDelegatingFuture<V>
extends DelegatingFuture<V>

A DelegatingFuture that can cancel a Runnable/Callable that is executed by an IExecutorService. It does this by sending a CancellationRequest to the remote owning member and then cancelling the running task.


Field Summary
 
Fields inherited from class com.hazelcast.util.executor.DelegatingFuture
future
 
Constructor Summary
ClientCancellableDelegatingFuture(ICompletableFuture future, ClientContext context, String uuid, Address target, int partitionId)
           
ClientCancellableDelegatingFuture(ICompletableFuture future, ClientContext context, String uuid, Address target, int partitionId, V defaultValue)
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 boolean isCancelled()
           
 
Methods inherited from class com.hazelcast.util.executor.DelegatingFuture
andThen, andThen, get, get, isDone, setDone, setError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientCancellableDelegatingFuture

public ClientCancellableDelegatingFuture(ICompletableFuture future,
                                         ClientContext context,
                                         String uuid,
                                         Address target,
                                         int partitionId)

ClientCancellableDelegatingFuture

public ClientCancellableDelegatingFuture(ICompletableFuture future,
                                         ClientContext context,
                                         String uuid,
                                         Address target,
                                         int partitionId,
                                         V defaultValue)
Method Detail

cancel

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

isCancelled

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


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