|
||||||||||
| 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. |
File |
getRepositoryHome()
Return the repository home. |
NamespaceResolver |
getResolver()
Return this journal's namespace resolver. |
String |
getRevision()
|
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 |
setRepositoryHome(File repHome)
Set the repository home. |
void |
setRevision(String revision)
|
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, getInstanceRevision, getRecords, getRecords |
| Constructor Detail |
|---|
public AbstractJournal()
| Method Detail |
|---|
public void init(String id,
NamespaceResolver resolver)
throws JournalException
init in interface Journalid - id this journal should use to write its own recordsresolver - resolver used when reading/writing records
JournalException - if an error occurs
public void register(RecordConsumer consumer)
throws JournalException
register in interface Journalconsumer - record consumer
JournalException - if an error occurspublic boolean unregister(RecordConsumer consumer)
unregister in interface Journalconsumer - 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 Journalidentifier - identifier
protected RecordProducer createProducer(String identifier)
identifier - producer identifier
public 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 JournalJournalException - if an error occurs
protected void doSync(long startRevision)
throws JournalException
startRevision - start point (exclusive)
JournalException - if an error occurs
public void lockAndSync()
throws JournalException
JournalException - if an error occurspublic void unlock(boolean successful)
successful - flag indicating whether the update process was
successful
protected abstract void doLock()
throws JournalException
JournalException - if an error occursprotected void appending(AppendRecord record)
record - record that was appended
protected 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()
public void setRepositoryHome(File repHome)
repHome - repository homepublic File getRepositoryHome()
public String getRevision()
public void setRevision(String revision)
revision - the path of the cluster node's local revision file to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||