com.datastax.driver.core
Class ShutdownFuture

java.lang.Object
  extended by com.google.common.util.concurrent.AbstractFuture<Void>
      extended by com.datastax.driver.core.ShutdownFuture
All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<Void>, Future<Void>

public abstract class ShutdownFuture
extends com.google.common.util.concurrent.AbstractFuture<Void>

A future on the shutdown of a Cluster or Session instance.

This is a standard future except for the fact that this class has an additional force() method that can be used to expedite the shutdown process (see below).

Note that this class implements Guava's ListenableFuture and can so be used with Guava's future utilities.


Method Summary
abstract  ShutdownFuture force()
          Try to force the completion of the shutdown this a future of.
 
Methods inherited from class com.google.common.util.concurrent.AbstractFuture
addListener, cancel, get, get, interruptTask, isCancelled, isDone, set, setException, wasInterrupted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

force

public abstract ShutdownFuture force()
Try to force the completion of the shutdown this a future of.

This method will do its best to expedite the shutdown process. In particular, all connection will be closed right away, even if there is ongoing queries at the time of the call to this method.

Note that this method does not block. The completion of this method does not imply that the shutdown process and you still need to wait on this future to ensure that, though calling this method does ensure said future will return in a timely way.

Returns:
this ShutdownFuture.


Copyright © 2013. All rights reserved.