public enum StorageError extends Enum<StorageError>
Each constant carries the human-readable label used in console and log messages, and whether the failure is fatal for the torrent (stop) or transient (drop the request and retry later).
| Enum Constant and Description |
|---|
IO_ERROR |
IS_DIRECTORY |
MISSINGtransient: file vanished, retry |
NAME_TOO_LONG |
NO_SPACE |
OTHERunclassified; the raw exception text is preserved by describe() |
PERMISSION |
QUOTA |
READ_ONLY |
STALE_HANDLEtransient: stale or read-only handle, retry |
TOO_MANY_OPENtransient: fd exhaustion, retry |
| Modifier and Type | Method and Description |
|---|---|
static StorageError | classify(IOException ioe)Classify a storage failure. |
static String | describe(IOException ioe)Human-readable description of a storage failure, preserving the raw
exception text for unclassified errors. |
boolean | isFatal()Whether a torrent should stop on this failure rather than drop the
request and retry. |
String | toString()Human-readable label for console and log messages. |
static StorageError | valueOf(String name)Returns the enum constant of this type with the specified name. |
static StorageError[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. |
public static final StorageError IO_ERROR
public static final StorageError IS_DIRECTORY
public static final StorageError MISSING
public static final StorageError NAME_TOO_LONG
public static final StorageError NO_SPACE
public static final StorageError OTHER
public static final StorageError PERMISSION
public static final StorageError QUOTA
public static final StorageError READ_ONLY
public static final StorageError STALE_HANDLE
public static final StorageError TOO_MANY_OPEN
public static StorageError classify(IOException ioe)
ioe - the storage errorpublic static String describe(IOException ioe)
ioe - the storage errorpublic boolean isFatal()
public String toString()
toString in class Enum<StorageError>public static StorageError valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static StorageError[] values()
for (StorageError c : StorageError.values()) System.out.println(c);