Package io.servicetalk.concurrent.api
Interface AsyncCloseable
- All Known Subinterfaces:
BasicAuthHttpServiceFilter.CredentialsVerifier<UserInfo>
,ClientGroup<Key,
,Client> CompositeCloseable
,ConnectionAcceptor
,ConnectionContext
,ConnectionFactory<ResolvedAddress,
,C> EarlyConnectionAcceptor
,EventLoopAwareNettyIoExecutor
,Executor
,FilterableReservedStreamingHttpConnection
,FilterableStreamingHttpClient
,FilterableStreamingHttpConnection
,FilterableStreamingHttpLoadBalancedConnection
,GrpcClient<BlockingClient>
,GrpcClientCallFactory
,GrpcRoutes.AllGrpcRoutes
,GrpcRoutes.RequestStreamingRoute<Req,
,Resp> GrpcRoutes.ResponseStreamingRoute<Req,
,Resp> GrpcRoutes.Route<Req,
,Resp> GrpcRoutes.StreamingRoute<Req,
,Resp> GrpcServerContext
,GrpcService
,GrpcServiceContext
,Health.CheckRpc
,Health.HealthClient
,Health.HealthService
,Health.WatchRpc
,HttpClient
,HttpConnection
,HttpConnectionContext
,HttpRequester
,HttpServerContext
,HttpService
,InfluencerConnectionAcceptor
,IoExecutor
,LateConnectionAcceptor
,ListenableAsyncCloseable
,LoadBalancedAddress<C>
,LoadBalancedConnection
,LoadBalancer<C>
,NettyConnection<Read,
,Write> NettyConnectionContext
,NettyIoExecutor
,PartitionMap<T>
,ReservedHttpConnection
,ReservedStreamingHttpConnection
,ServerContext
,ServiceDiscoverer<UnresolvedAddress,
,ResolvedAddress, E> StreamingHttpClient
,StreamingHttpConnection
,StreamingHttpRequester
,StreamingHttpService
- All Known Implementing Classes:
ChannelSet
,DefaultHealthService
,DefaultNettyConnection
,DefaultPartitionedClientGroup
,DelegatingConnectionAcceptor
,DelegatingConnectionContext
,DelegatingConnectionFactory
,DelegatingExecutor
,DelegatingFilterableStreamingHttpLoadBalancedConnection
,DelegatingHttpConnectionContext
,DelegatingHttpServiceContext
,DelegatingServiceDiscoverer
,HttpLoadBalancerFactory.DefaultFilterableStreamingHttpLoadBalancedConnection
,HttpReporter
,HttpServiceContext
,NettyChannelListenableAsyncCloseable
,NettyPipelinedConnection
,NettyServerContext
,PowerSetPartitionMap
,ReservedStreamingHttpConnectionFilter
,StreamingHttpClientFilter
,StreamingHttpConnectionFilter
,StreamingHttpServiceFilter
,StreamingHttpServiceToOffloadedStreamingHttpService
,UdpReporter
,ZipkinPublisher
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Used to close/shutdown a resource.
-
Method Summary
Modifier and TypeMethodDescriptionUsed to close/shutdown a resource.default Completable
Used to close/shutdown a resource, similar tocloseAsync()
, but attempts to cleanup state before abruptly closing.
-
Method Details
-
closeAsync
Completable closeAsync()Used to close/shutdown a resource.- Returns:
- A
Completable
that is notified once the close is complete.
-
closeAsyncGracefully
Used to close/shutdown a resource, similar tocloseAsync()
, but attempts to cleanup state before abruptly closing. This provides a hint that implementations can use to stop accepting new work and finish in flight work. This method is implemented on a "best effort" basis and may be equivalent tocloseAsync()
.Note: Implementations may or may not apply a timeout for this operation to complete, if a caller does not want to wait indefinitely, and are unsure if the implementation applies a timeout, it is advisable to apply a timeout and force a call to
closeAsync()
.- Returns:
- A
Completable
that is notified once the close is complete.
-