@InterfaceAudience.Private @InterfaceStability.Evolving public class TrashPolicyDefault extends TrashPolicy
deletionInterval, fs, trash| Constructor and Description |
|---|
TrashPolicyDefault() |
| Modifier and Type | Method and Description |
|---|---|
void |
createCheckpoint()
Create a trash checkpoint.
|
void |
deleteCheckpoint()
Delete old trash checkpoint(s).
|
Path |
getCurrentTrashDir()
Get the current working directory of the Trash Policy
|
Runnable |
getEmptier()
Return a
Runnable that periodically empties the trash of all
users, intended to be run by the superuser. |
void |
initialize(Configuration conf,
FileSystem fs,
Path home)
Used to setup the trash policy.
|
boolean |
isEnabled()
Returns whether the Trash Policy is enabled for this filesystem
|
boolean |
moveToTrash(Path path)
Move a file or directory to the current trash directory.
|
getInstancegetConf, setConfpublic void initialize(Configuration conf, FileSystem fs, Path home)
TrashPolicyinitialize in class TrashPolicyconf - the configuration to be usedfs - the filesystem to be usedhome - the home directorypublic boolean isEnabled()
TrashPolicyisEnabled in class TrashPolicypublic boolean moveToTrash(Path path) throws IOException
TrashPolicymoveToTrash in class TrashPolicyIOExceptionpublic void createCheckpoint()
throws IOException
TrashPolicycreateCheckpoint in class TrashPolicyIOExceptionpublic void deleteCheckpoint()
throws IOException
TrashPolicydeleteCheckpoint in class TrashPolicyIOExceptionpublic Path getCurrentTrashDir()
TrashPolicygetCurrentTrashDir in class TrashPolicypublic Runnable getEmptier() throws IOException
TrashPolicyRunnable that periodically empties the trash of all
users, intended to be run by the superuser.getEmptier in class TrashPolicyIOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.