Class CloseableInvoker

java.lang.Object
com.yahoo.search.dispatch.CloseableInvoker
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
FillInvoker, SearchInvoker

public abstract class CloseableInvoker extends Object implements Closeable
CloseableInvoker is an abstract implementation of Closeable with an additional hook for executing code at closing. Classes that extend CloseableInvoker need to override release() instead of close() which is final to avoid accidental overriding.
Author:
ollivir
  • Constructor Details

    • CloseableInvoker

      public CloseableInvoker()
  • Method Details

    • release

      protected abstract void release()
    • teardown

      public void teardown(BiConsumer<Boolean,com.yahoo.search.dispatch.RequestDuration> teardown)
    • setFinalStatus

      protected void setFinalStatus(boolean success)
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable