|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.journal.AbstractJournal
org.apache.jackrabbit.core.journal.FileJournal
public class FileJournal
File-based journal implementation that appends journal records to a single file.
It is configured through the following properties:directory: the directory where to keep the journal file as
well as the rotated files; this is a required property with no default valuebasename: the basename of journal files; the default
value is DEFAULT_BASENAMEmaximumSize: the maximum size of an active journal file
before rotating it: the default value is DEFAULT_MAXSIZE
| Constructor Summary | |
|---|---|
FileJournal()
|
|
| Method Summary | |
|---|---|
protected long |
append(String producerId,
InputStream in,
int length)
Append a record backed by a file. |
void |
close()
Close this journal. |
protected void |
doLock()
Lock the journal revision. |
protected void |
doUnlock(boolean successful)
Unlock the journal revision. |
String |
getBasename()
|
String |
getDirectory()
Bean getters |
int |
getMaximumSize()
|
protected RecordIterator |
getRecords(long startRevision)
Return an iterator over all records after the specified revision. |
protected long |
getRevision()
|
void |
init(String id,
NamespaceResolver resolver)
Initialize journal. |
void |
setBasename(String basename)
|
void |
setDirectory(String directory)
Bean setters |
void |
setMaximumSize(int maximumSize)
|
| Methods inherited from class org.apache.jackrabbit.core.journal.AbstractJournal |
|---|
createProducer, doSync, getConsumer, getId, getProducer, getResolver, lockAndSync, register, sync, unlock, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileJournal()
| Method Detail |
|---|
public void init(String id,
NamespaceResolver resolver)
throws JournalException
init in interface Journalinit in class AbstractJournalid - id this journal should use to write its own recordsresolver - resolver used when reading/writing records
JournalException - if an error occurs
protected long getRevision()
throws JournalException
JournalException
protected RecordIterator getRecords(long startRevision)
throws JournalException
getRecords in class AbstractJournalstartRevision - start point (exlusive)
JournalException - if an error occurs
protected void doLock()
throws JournalException
doLock in class AbstractJournalJournalException - if an error occurs
protected long append(String producerId,
InputStream in,
int length)
throws JournalException
append in class AbstractJournalproducerId - producer identifierin - input streamlength - number of bytes in input stream
JournalException - if an error occursprotected void doUnlock(boolean successful)
doUnlock in class AbstractJournalsuccessful - flag indicating whether the update process was
successfulpublic void close()
public String getDirectory()
public String getBasename()
public int getMaximumSize()
public void setDirectory(String directory)
public void setBasename(String basename)
public void setMaximumSize(int maximumSize)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||