Package com.datastax.driver.core
Class CloseFuture
- java.lang.Object
-
- com.google.common.util.concurrent.internal.InternalFutureFailureAccess
-
- com.google.common.util.concurrent.AbstractFuture<Void>
-
- com.datastax.driver.core.CloseFuture
-
- All Implemented Interfaces:
ListenableFuture<Void>,Future<Void>
public abstract class CloseFuture extends 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
ListenableFutureand can so be used with Guava's future utilities.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract CloseFutureforce()Try to force the completion of the shutdown this is a future of.-
Methods inherited from class com.google.common.util.concurrent.AbstractFuture
addListener, afterDone, cancel, get, get, interruptTask, isCancelled, isDone, pendingToString, set, setException, setFuture, toString, tryInternalFastPathGetFailure, wasInterrupted
-
-
-
-
Method Detail
-
force
public abstract CloseFuture force()
Try to force the completion of the shutdown this is a future of.This method will do its best to expedite the shutdown process. In particular, all connections will be closed right away, even if there are ongoing queries at the time this method is called.
Note that this method does not block. The completion of this method does not imply the shutdown process is done, you still need to wait on this future to ensure that, but calling this method will ensure said future will return in a timely way.
- Returns:
- this
CloseFuture.
-
-