|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.journal.AbstractJournal
public abstract class AbstractJournal
Base journal implementation.
Constructor Summary | |
---|---|
AbstractJournal()
|
Method Summary | |
---|---|
protected abstract void |
append(AppendRecord record,
InputStream in,
int length)
Append a record backed by a file. |
protected void |
appending(AppendRecord record)
Notification method called by an appended record at creation time. |
protected RecordProducer |
createProducer(String identifier)
Create the record producer for a given identifier. |
protected abstract void |
doLock()
Lock the journal revision. |
protected void |
doSync(long startRevision)
Synchronize contents from journal. |
protected abstract void |
doUnlock(boolean successful)
Unlock the journal revision. |
RecordConsumer |
getConsumer(String identifier)
Return the consumer given its identifier. |
String |
getId()
Return this journal's identifier. |
NamePathResolver |
getNamePathResolver()
Return this journal's NamePathResolver. |
RecordProducer |
getProducer(String identifier)
Return the record producer for a given identifier. |
protected abstract RecordIterator |
getRecords(long startRevision)
Return an iterator over all records after the specified revision. |
NamespaceResolver |
getResolver()
Return this journal's namespace resolver. |
void |
init(String id,
NamespaceResolver resolver)
Initialize journal. |
void |
lockAndSync()
Lock the journal revision, disallowing changes from other sources until {@link #unlock has been called, and synchronizes to the latest change. |
void |
register(RecordConsumer consumer)
Register a record consumer. |
void |
sync()
Synchronize contents from journal. |
void |
unlock(boolean successful)
Unlock the journal revision. |
boolean |
unregister(RecordConsumer consumer)
Unregister a record processor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jackrabbit.core.journal.Journal |
---|
close |
Constructor Detail |
---|
public AbstractJournal()
Method Detail |
---|
public void init(String id, NamespaceResolver resolver) throws JournalException
init
in interface Journal
id
- id this journal should use to write its own recordsresolver
- resolver used when reading/writing records
JournalException
- if an error occurspublic void register(RecordConsumer consumer) throws JournalException
register
in interface Journal
consumer
- record consumer
JournalException
- if an error occurspublic boolean unregister(RecordConsumer consumer)
unregister
in interface Journal
consumer
- record processor to unregister
true
if the consumer was previously registered;
false
otherwisepublic RecordConsumer getConsumer(String identifier)
identifier
- identifier
null
if no consumer is associated with identifierpublic RecordProducer getProducer(String identifier)
getProducer
in interface Journal
identifier
- identifierprotected RecordProducer createProducer(String identifier)
identifier
- producer identifierpublic void sync() throws JournalException
RecordConsumer.consume(org.apache.jackrabbit.core.journal.Record)
method when their identifier
matches the one found in the records.
sync
in interface Journal
JournalException
- if an error occursprotected void doSync(long startRevision) throws JournalException
startRevision
- start point (exlusive)
JournalException
- if an error occursprotected abstract RecordIterator getRecords(long startRevision) throws JournalException
startRevision
- start point (exlusive)
JournalException
- if an error occurspublic void lockAndSync() throws JournalException
JournalException
- if an error occurspublic void unlock(boolean successful)
successful
- flag indicating whether the update process was
successfulprotected abstract void doLock() throws JournalException
JournalException
- if an error occursprotected void appending(AppendRecord record)
record
- record that was appendedprotected abstract void append(AppendRecord record, InputStream in, int length) throws JournalException
record
- record to appendin
- input streamlength
- number of bytes in input stream
JournalException
- if an error occursprotected abstract void doUnlock(boolean successful)
successful
- flag indicating whether the update process was
successfulpublic String getId()
public NamespaceResolver getResolver()
public NamePathResolver getNamePathResolver()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |