Package org.apache.cassandra.db
Class DisallowedDirectories
- java.lang.Object
-
- org.apache.cassandra.db.DisallowedDirectories
-
- All Implemented Interfaces:
DisallowedDirectoriesMBean
public class DisallowedDirectories extends java.lang.Object implements DisallowedDirectoriesMBean
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEPRECATED_MBEAN_NAME
static java.lang.String
MBEAN_NAME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
clearUnwritableUnsafe()
Testing only! Clear the set of unwritable directories.static int
getDirectoriesVersion()
java.util.Set<java.io.File>
getUnreadableDirectories()
java.util.Set<java.io.File>
getUnwritableDirectories()
static boolean
isUnreadable(File directory)
Tells whether or not the directory is disallowed for reads.static boolean
isUnwritable(File directory)
Tells whether or not the directory is disallowed for writes.void
markUnreadable(java.lang.String path)
void
markUnwritable(java.lang.String path)
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.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.
-
-
-
Field Detail
-
DEPRECATED_MBEAN_NAME
public static final java.lang.String DEPRECATED_MBEAN_NAME
- See Also:
- Constant Field Values
-
MBEAN_NAME
public static final java.lang.String MBEAN_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUnreadableDirectories
public java.util.Set<java.io.File> getUnreadableDirectories()
- Specified by:
getUnreadableDirectories
in interfaceDisallowedDirectoriesMBean
-
getUnwritableDirectories
public java.util.Set<java.io.File> getUnwritableDirectories()
- Specified by:
getUnwritableDirectories
in interfaceDisallowedDirectoriesMBean
-
markUnreadable
public void markUnreadable(java.lang.String path)
- Specified by:
markUnreadable
in interfaceDisallowedDirectoriesMBean
-
markUnwritable
public void markUnwritable(java.lang.String path)
- Specified by:
markUnwritable
in interfaceDisallowedDirectoriesMBean
-
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.
-
-