public abstract class CloseFuture extends AbstractFuture<Void>
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.
Modifier and Type | Method and Description |
---|---|
abstract CloseFuture |
force()
Try to force the completion of the shutdown this is a future of.
|
addListener, cancel, get, get, interruptTask, isCancelled, isDone, set, setException, setFuture, wasInterrupted
public abstract CloseFuture force()
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.
CloseFuture
.Copyright © 2012–2018. All rights reserved.