com.atlassian.stash.util.Drainable |
Indicates connection pools and similar data structures have a means of waiting for resources to close/clean up.
The drain
method may be used to block while all
resources are closed or cleaned up in some implementation-specific way.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Waits for all resources to become free.
|
Waits for all resources to become free. For pooling resources, draining ensures all pooled resources have been returned to the pool.
timeout | the timeout which, using the specified unit, will be converted to milliseconds |
---|---|
unit | the unit the provided timeout is in |
true
if the pool was drained; otherwise, false
if 1 or more resources could not
be accounted for within the specified timeout