public interface ForcedDrainable extends Drainable
Modifier and Type | Method and Description |
---|---|
boolean |
forceDrain(long timeout,
TimeUnit unit)
A more aggressive form of
Drainable.drain(long, java.util.concurrent.TimeUnit) . |
boolean forceDrain(long timeout, @Nonnull TimeUnit unit)
Drainable.drain(long, java.util.concurrent.TimeUnit)
. If after the supplied timeout
the underlying resources are not free then this object will take additional steps to ensure they are free.
Callers are advised to first drain
before forcing to
minimise adverse effects from this more aggressive approach.
Note that this method is not guaranteed to succeed and the caller must take care to handle the possibility that some or all of the underlying resources may still be in use after this method returns.
timeout
- the timeout which, using the specified unit, will be converted to millisecondsunit
- the unit the provided timeout is intrue
if the pool was drained; otherwise, false
if 1 or more resources could not
be accounted for or forced within the specified timeoutCopyright © 2024 Atlassian. All rights reserved.