Interface AsyncCloseable
- All Known Implementing Classes:
Cotani
public interface AsyncCloseable
Owns resources that can be closed without blocking the calling thread.
The first call begins closing. Concurrent and later calls must observe the same logical completion and must not repeat resource cleanup. Implementations document how new work is rejected once closing begins.
-
Method Summary
Modifier and TypeMethodDescriptionBegins non-blocking resource shutdown.
-
Method Details
-
closeAsync
CompletionStage<Void> closeAsync()Begins non-blocking resource shutdown.- Returns:
- a stage that completes after all owned resources have closed
-