Class FilePathRetryOnInterrupt

java.lang.Object
org.h2.store.fs.FilePath
org.h2.store.fs.FilePathWrapper
org.h2.store.fs.retry.FilePathRetryOnInterrupt

public class FilePathRetryOnInterrupt extends FilePathWrapper
A file system that re-opens and re-tries the operation if the file was closed, because a thread was interrupted. This will clear the interrupt flag. It is mainly useful for applications that call Thread.interrupt by mistake.
  • Field Details

  • Constructor Details

    • FilePathRetryOnInterrupt

      public FilePathRetryOnInterrupt()
  • Method Details

    • open

      public FileChannel open(String mode) throws IOException
      Description copied from class: FilePath
      Open a random access file object.
      Overrides:
      open in class FilePathWrapper
      Parameters:
      mode - the access mode. Supported are r, rw, rws, rwd
      Returns:
      the file object
      Throws:
      IOException - If an I/O error occurs
    • getScheme

      public String getScheme()
      Description copied from class: FilePath
      Get the scheme (prefix) for this file provider. This is similar to java.nio.file.spi.FileSystemProvider.getScheme.
      Specified by:
      getScheme in class FilePath
      Returns:
      the scheme