Class CloseableInvoker

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    FillInvoker, SearchInvoker

    public abstract class CloseableInvoker
    extends java.lang.Object
    implements java.io.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
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      protected abstract void release()  
      protected void setFinalStatus​(boolean success)  
      void teardown​(java.util.function.BiConsumer<java.lang.Boolean,​java.lang.Long> teardown)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CloseableInvoker

        public CloseableInvoker()
    • Method Detail

      • release

        protected abstract void release()
      • teardown

        public void teardown​(java.util.function.BiConsumer<java.lang.Boolean,​java.lang.Long> teardown)
      • setFinalStatus

        protected void setFinalStatus​(boolean success)
      • close

        public final void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable