Class AutoCloseableBase

java.lang.Object
org.aksw.commons.util.closeable.AutoCloseableBase
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
AutoCloseableWithLeakDetectionBase

public class AutoCloseableBase extends Object implements AutoCloseable
  • Field Details

    • isClosed

      protected volatile boolean isClosed
    • enableCloseStackTrace

      protected boolean enableCloseStackTrace
    • closeStackTrace

      protected StackTraceElement[] closeStackTrace
  • Constructor Details

    • AutoCloseableBase

      public AutoCloseableBase()
    • AutoCloseableBase

      public AutoCloseableBase(boolean enableCloseStackTrace)
  • Method Details

    • ensureOpen

      protected void ensureOpen()
      To be called within synchronized functions
    • throwClosedException

      protected void throwClosedException(String msg)
    • closeActual

      protected void closeActual() throws Exception
      Throws:
      Exception
    • close

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