@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.
|
getInstance
getConf, setConf
public void initialize(Configuration conf, FileSystem fs, Path home)
TrashPolicy
initialize
in class TrashPolicy
conf
- the configuration to be usedfs
- the filesystem to be usedhome
- the home directorypublic boolean isEnabled()
TrashPolicy
isEnabled
in class TrashPolicy
public boolean moveToTrash(Path path) throws IOException
TrashPolicy
moveToTrash
in class TrashPolicy
IOException
public void createCheckpoint() throws IOException
TrashPolicy
createCheckpoint
in class TrashPolicy
IOException
public void deleteCheckpoint() throws IOException
TrashPolicy
deleteCheckpoint
in class TrashPolicy
IOException
public Path getCurrentTrashDir()
TrashPolicy
getCurrentTrashDir
in class TrashPolicy
public Runnable getEmptier() throws IOException
TrashPolicy
Runnable
that periodically empties the trash of all
users, intended to be run by the superuser.getEmptier
in class TrashPolicy
IOException
Copyright © 2013 Apache Software Foundation. All rights reserved.