Package com.linecorp.armeria.common.util
Interface AsyncCloseable
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface AsyncCloseable
An object that may hold resources until it is closed. UnlikeAutoCloseable
, thecloseAsync()
method releases the resources asynchronously, returning theCompletableFuture
which is completed after the resources are released.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<?>
closeAsync()
Releases the resources held by this object asynchronously.
-
-
-
Method Detail
-
closeAsync
CompletableFuture<?> closeAsync()
Releases the resources held by this object asynchronously.- Returns:
- the
CompletableFuture
which is completed after the resources are released
-
-