org.apache.cassandra.db

## Class BlacklistedDirectories

- java.lang.Object
- - org.apache.cassandra.db.BlacklistedDirectories

All Implemented Interfaces:
  BlacklistedDirectoriesMBean

    public class BlacklistedDirectories
    extends java.lang.Object
    implements BlacklistedDirectoriesMBean

### Field Summary

Fields
`static java.lang.String` `MBEAN_NAME`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`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(java.io.File directory)` Tells whether or not the directory is blacklisted for reads.
`static boolean` `isUnwritable(java.io.File directory)` Tells whether or not the directory is blacklisted for writes.
`void` `markUnreadable(java.lang.String path)`
`void` `markUnwritable(java.lang.String path)`
`static java.io.File` `maybeMarkUnreadable(java.io.File path)` Adds parent directory of the file (or the file itself, if it is a directory) to the set of unreadable directories.
`static java.io.File` `maybeMarkUnwritable(java.io.File path)` Adds parent directory of the file (or the file itself, if it is a directory) to the set of unwritable directories.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### 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 interface `BlacklistedDirectoriesMBean`

#### getUnwritableDirectories

    public java.util.Set<java.io.File> getUnwritableDirectories()

Specified by:
  `getUnwritableDirectories` in interface `BlacklistedDirectoriesMBean`

#### markUnreadable

    public void markUnreadable(java.lang.String path)

Specified by:
  `markUnreadable` in interface `BlacklistedDirectoriesMBean`

#### markUnwritable

    public void markUnwritable(java.lang.String path)

Specified by:
  `markUnwritable` in interface `BlacklistedDirectoriesMBean`

#### maybeMarkUnreadable

    public static java.io.File maybeMarkUnreadable(java.io.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 blacklisted directory or null if nothing has been added to the list.

#### maybeMarkUnwritable

    public static java.io.File maybeMarkUnwritable(java.io.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 blacklisted 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(java.io.File directory)

Tells whether or not the directory is blacklisted for reads.

Returns:
  whether or not the directory is blacklisted for reads.

#### isUnwritable

    public static boolean isUnwritable(java.io.File directory)

Tells whether or not the directory is blacklisted for writes.

Returns:
  whether or not the directory is blacklisted for reads.