public static enum FileCache.FileProperties extends java.lang.Enum<FileCache.FileProperties>
| Enum Constant and Description |
|---|
HASH
The properties include the hash of the given regular file (not a directory).
|
PATH_HASH
The properties include the (not-yet-normalized) path and hash of the given regular file
(not a directory).
|
PATH_SIZE_TIMESTAMP
The properties include the (not-yet-normalized) path, size, and timestamp of a regular
file (not a directory).
|
| Modifier and Type | Method and Description |
|---|---|
static FileCache.FileProperties |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static FileCache.FileProperties[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FileCache.FileProperties HASH
This is the recommended way of constructing the cache inputs for a regular file. Note
that the properties do not include the path or name of the given file. Clients can
consider using PATH_HASH to also include the file's path in the cache inputs
(typically for debugging purposes).
public static final FileCache.FileProperties PATH_HASH
This option is similar to HASH except that the file's path is also included
in the cache inputs, typically for debugging purposes (e.g., to find out what file a
cache entry is created from).
public static final FileCache.FileProperties PATH_SIZE_TIMESTAMP
WARNING: Although this option is faster than using HASH, it is not as safe.
The main reason is that, due to the granularity of filesystem timestamps, timestamps may
actually not change between two consecutive writes. This will lead to incorrect cache
entries. This option should only be used after careful consideration and with knowledge
of its limitations. Otherwise, HASH should be used instead.
public static FileCache.FileProperties[] values()
for (FileCache.FileProperties c : FileCache.FileProperties.values()) System.out.println(c);
public static FileCache.FileProperties valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null