public abstract class CloseFuture extends com.google.common.util.concurrent.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.
|
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 is 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–2015. All rights reserved.