Interface BaseRestHandler.RestChannelConsumer

All Superinterfaces:
AutoCloseable, CheckedConsumer<RestChannel,Exception>, Closeable, Releasable
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 Type
    Method
    Description
    default void
    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 calling RefCounted.decRef() on any newly-created transport requests with nontrivial lifecycles.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface Releasable