public static final class FileCleaningTracker.Tracker extends PhantomReference<Object>
| Constructor and Description |
|---|
Tracker(String path,
FileDeleteStrategy deleteStrategy,
Object marker,
ReferenceQueue<? super Object> queue)
Constructs an instance of this class from the supplied parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete()
Deletes the file associated with this tracker instance.
|
String |
getPath()
Gets the path.
|
getclear, clone, enqueue, isEnqueuedTracker(String path, FileDeleteStrategy deleteStrategy, Object marker, ReferenceQueue<? super Object> queue)
path - the full path to the file to be tracked, not nulldeleteStrategy - the strategy to delete the file, null means normalmarker - the marker object used to track the file, not nullqueue - the queue on to which the tracker will be pushed, not nullpublic boolean delete()
true if the file was deleted successfully;
false otherwise.public String getPath()