stop
Synchronously closes this resource with graceful shutdown.
This method blocks the calling thread until all ongoing operations complete and the resource is fully shut down. It delegates to the asynchronous closeGracefully() method and waits for its completion.
This implementation ensures that close() adheres to the AutoCloseable contract while providing graceful shutdown behavior.
See also
for the asynchronous version
Throws
if the underlying reactive stream fails
Synchronously closes this resource with graceful shutdown within a specified timeout.
This method blocks the calling thread until either all ongoing operations complete and the resource is fully shut down, or the specified timeout expires. It delegates to the asynchronous closeGracefully() method and waits for its completion with a time limit.
If the timeout expires before shutdown completes, the method returns without guaranteeing that all operations have finished. Implementations should handle any necessary cleanup in such cases.
Parameters
The maximum duration to wait for graceful shutdown to complete
See also
for the asynchronous version
for the version without timeout
Throws
if the underlying reactive stream fails