|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ref.Reference<T>
java.lang.ref.PhantomReference<java.lang.Object>
org.apache.commons.io.FileCleaningTracker.Tracker
private static final class FileCleaningTracker.Tracker
Inner class which acts as the reference for a file pending deletion.
Field Summary | |
---|---|
private FileDeleteStrategy |
deleteStrategy
The strategy for deleting files. |
private java.lang.String |
path
The full path to the file being tracked. |
Constructor Summary | |
---|---|
FileCleaningTracker.Tracker(java.lang.String path,
FileDeleteStrategy deleteStrategy,
java.lang.Object marker,
java.lang.ref.ReferenceQueue<? super java.lang.Object> queue)
Constructs an instance of this class from the supplied parameters. |
Method Summary | |
---|---|
boolean |
delete()
Deletes the file associated with this tracker instance. |
java.lang.String |
getPath()
Return the path. |
Methods inherited from class java.lang.ref.PhantomReference |
---|
get |
Methods inherited from class java.lang.ref.Reference |
---|
clear, enqueue, isEnqueued |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.String path
private final FileDeleteStrategy deleteStrategy
Constructor Detail |
---|
FileCleaningTracker.Tracker(java.lang.String path, FileDeleteStrategy deleteStrategy, java.lang.Object marker, java.lang.ref.ReferenceQueue<? super java.lang.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 nullMethod Detail |
---|
public java.lang.String getPath()
public boolean delete()
true
if the file was deleted successfully;
false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |