Class TempFileHolder

  • All Implemented Interfaces:
    LazyCleaner.CleaningAction<java.io.IOException>

    class TempFileHolder
    extends java.lang.Object
    implements LazyCleaner.CleaningAction<java.io.IOException>
    The action deletes temporary file in case the user submits a large input stream, and then abandons the statement.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.logging.Logger LOGGER  
      private java.io.InputStream stream  
      private java.nio.file.Path tempFile  
    • Constructor Summary

      Constructors 
      Constructor Description
      TempFileHolder​(java.nio.file.Path tempFile)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream getStream()  
      void onClean​(boolean leak)  
      • Methods inherited from class java.lang.Object

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

      • LOGGER

        private static final java.util.logging.Logger LOGGER
      • stream

        private java.io.InputStream stream
      • tempFile

        private java.nio.file.Path tempFile
    • Constructor Detail

      • TempFileHolder

        TempFileHolder​(java.nio.file.Path tempFile)
    • Method Detail

      • getStream

        public java.io.InputStream getStream()
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • onClean

        public void onClean​(boolean leak)
                     throws java.io.IOException
        Specified by:
        onClean in interface LazyCleaner.CleaningAction<java.io.IOException>
        Throws:
        java.io.IOException