public class FileRevision extends Object implements InstanceRevision
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closed
Flag indicating whether this revision file is closed.
|
protected RandomAccessFile |
raf
Underlying random access file.
|
protected boolean |
sync
Flag indicating whether to sync the file on every write.
|
protected long |
value
Cached value.
|
| Constructor and Description |
|---|
FileRevision(File file,
boolean sync)
Creates a new file based revision counter.
|
protected final RandomAccessFile raf
protected final boolean sync
protected long value
protected boolean closed
public FileRevision(File file, boolean sync) throws JournalException
file - holding global countersync - whether to sync the file on every writeJournalException - if some error occurspublic long get()
throws JournalException
get in interface InstanceRevisionJournalException - if some error occurspublic void set(long value)
throws JournalException
set in interface InstanceRevisionvalue - new counter valueJournalException - if some error occurspublic void close()
close in interface InstanceRevisionCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.