Close the resource with the given deadline exactly once.
Close the resource with the given deadline exactly once. This deadline is advisory, giving the callee some leeway, for example to drain clients or finish up other tasks.
if this method throws a synchronous exception, that exception will be wrapped in a failed future.
Close the resource with the given deadline.
Close the resource with the given deadline. This deadline is advisory, giving the callee some leeway, for example to drain clients or finish up other tasks.
Close the resource with the given timeout.
Close the resource with the given timeout. This timeout is advisory, giving the callee some leeway, for example to drain clients or finish up other tasks.
Close the resource.
Close the resource. The returned Future is completed when the resource has been fully relinquished.
A Java-friendly API for the ClosableOnce trait.