Interface LeaseRecoverable


public interface LeaseRecoverable
Whether the given Path of the FileSystem has the capability to perform lease recovery.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Get the close status of a file.
    boolean
    Start the lease recovery of a file.
  • Method Details

    • recoverLease

      boolean recoverLease(Path file) throws IOException
      Start the lease recovery of a file.
      Parameters:
      file - path to a file.
      Returns:
      true if the file is already closed, and it does not require lease recovery.
      Throws:
      IOException - if an error occurs during lease recovery.
      UnsupportedOperationException - if lease recovery is not supported by this filesystem.
    • isFileClosed

      boolean isFileClosed(Path file) throws IOException
      Get the close status of a file.
      Parameters:
      file - The string representation of the path to the file
      Returns:
      return true if file is closed
      Throws:
      IOException - If an I/O error occurred
      UnsupportedOperationException - if isFileClosed is not supported by this filesystem.