|
Jalopy 1.0b10 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.hunsicker.jalopy.storage.History
History serves as a tracker for file modifications.
The flush()
method may be used to synchronously force updates to the backing
store. Normal termination of the Java Virtual Machine will not result in the
loss of pending updates - an explicit flushing is not required upon
termination to ensure that pending updates are made persistent.
This class is thread-safe.
Inner Class Summary | |
static class |
History.ChecksumCharArrayWriter
A writer that calculates a checkum during the writing process. |
static class |
History.Entry
Represents a history entry. |
static class |
History.Method
Represents the method used to identify dirty files and changed files. |
static class |
History.Policy
Represents a history policy. |
Method Summary | |
void |
add(File file,
String packageName,
long modification)
Adds the given file to the history. |
void |
clear()
Clears the history. |
void |
flush()
Stores the history to the backing store. |
History.Entry |
get(File file)
Returns the history entry for the given file. |
static History |
getInstance()
Returns the sole instance of this class. |
void |
remove(File file)
Removes the given file from the history. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static History getInstance()
public void add(File file, String packageName, long modification) throws IOException
file
- file to add.packageName
- the package name of the file to add.modification
- the time the file given was last processed.IOException
- if an I/O error occured, which is possible because a canonical
pathname will be constructed.public void clear()
public void flush() throws IOException
IOException
- if an I/O error occured.public History.Entry get(File file) throws IOException
file
- the file to get the corresponding history entry for.null
if no entry for
the given file exists.IOException
- if an I/O error occured, which is possible because a canonical
pathname will be constructed.public void remove(File file) throws IOException
file
- file to remove.IOException
- if an I/O error occured, which is possible because a canonical
pathname will be constructed.
|
Jalopy 1.0b10 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |