Class DisallowedDirectories

java.lang.Object
org.apache.cassandra.db.DisallowedDirectories
All Implemented Interfaces:
DisallowedDirectoriesMBean

public class DisallowedDirectories extends Object implements DisallowedDirectoriesMBean
  • Field Details

  • Method Details

    • getUnreadableDirectories

      public Set<File> getUnreadableDirectories()
      Specified by:
      getUnreadableDirectories in interface DisallowedDirectoriesMBean
    • getUnwritableDirectories

      public Set<File> getUnwritableDirectories()
      Specified by:
      getUnwritableDirectories in interface DisallowedDirectoriesMBean
    • markUnreadable

      public void markUnreadable(String path)
      Specified by:
      markUnreadable in interface DisallowedDirectoriesMBean
    • markUnwritable

      public void markUnwritable(String path)
      Specified by:
      markUnwritable in interface DisallowedDirectoriesMBean
    • maybeMarkUnreadable

      public static File maybeMarkUnreadable(File path)
      Adds parent directory of the file (or the file itself, if it is a directory) to the set of unreadable directories.
      Returns:
      the disallowed directory or null if nothing has been added to the list.
    • maybeMarkUnwritable

      public static File maybeMarkUnwritable(File path)
      Adds parent directory of the file (or the file itself, if it is a directory) to the set of unwritable directories.
      Returns:
      the disallowed directory or null if nothing has been added to the list.
    • getDirectoriesVersion

      public static int getDirectoriesVersion()
    • clearUnwritableUnsafe

      public static void clearUnwritableUnsafe()
      Testing only! Clear the set of unwritable directories.
    • isUnreadable

      public static boolean isUnreadable(File directory)
      Tells whether or not the directory is disallowed for reads.
      Returns:
      whether or not the directory is disallowed for reads.
    • isUnwritable

      public static boolean isUnwritable(File directory)
      Tells whether or not the directory is disallowed for writes.
      Returns:
      whether or not the directory is disallowed for reads.