public abstract class ShutdownFuture 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 ShutdownFuture |
force()
Try to force the completion of the shutdown this a future of.
|
public abstract ShutdownFuture force()
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.
ShutdownFuture
.Copyright © 2013. All rights reserved.