Module org.elasticsearch.server
Package org.elasticsearch.rest
Interface BaseRestHandler.RestChannelConsumer
- All Superinterfaces:
AutoCloseable
,CheckedConsumer<RestChannel,
,Exception> Closeable
,Releasable
- All Known Subinterfaces:
BaseRestHandler.RequestBodyChunkConsumer
- Enclosing class:
BaseRestHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
protected static interface BaseRestHandler.RestChannelConsumer
extends CheckedConsumer<RestChannel,Exception>, Releasable
REST requests are handled by preparing a channel consumer that represents the execution of the request against a channel.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
Called just after the execution has started (or failed, if the request was invalid), but typically well before the execution has completed.Methods inherited from interface org.elasticsearch.core.CheckedConsumer
accept, andThen
-
Method Details
-
close
default void close()Called just after the execution has started (or failed, if the request was invalid), but typically well before the execution has completed. This callback should be used to release (refs to) resources that were acquired when constructing this consumer, for instance by callingRefCounted.decRef()
on any newly-created transport requests with nontrivial lifecycles.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceReleasable
-