|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.server.journal.xmlhelpers.AbstractXmlReader
org.fcrepo.server.journal.JournalReader
public abstract class JournalReader
The abstract base for all JournalReader classes.
Each child class is responsible for providing an XMLEventReader that is positioned at the beginning of a JournalEntry tag. This class will read the entry and leave the XMLEventReader positioned after the corresponding closing tag.
| Field Summary | |
|---|---|
protected Map<String,String> |
parameters
|
protected JournalRecoveryLog |
recoveryLog
|
protected String |
role
|
protected ServerInterface |
server
|
| Constructor Summary | |
|---|---|
protected |
JournalReader(Map<String,String> parameters,
String role,
JournalRecoveryLog recoveryLog,
ServerInterface server)
Concrete sub-classes must implement this constructor. |
| Method Summary | |
|---|---|
protected void |
checkRepositoryHash(String hash)
Compare the repository hash from the journal file with the current hash obtained from the server. |
static JournalReader |
getInstance(Map<String,String> parameters,
String role,
JournalRecoveryLog recoveryLog,
ServerInterface server)
Create an instance of the proper JournalReader child class, as determined by the server parameters. |
abstract ConsumerJournalEntry |
readJournalEntry()
Concrete sub-classes should insure that their XMLEventReader is positioned at the beginning of a JournalEntry, and call readJournalEntry(XMLEventReader). |
protected ConsumerJournalEntry |
readJournalEntry(XMLEventReader reader)
Read a JournalEntry from the journal, to produce a ConsumerJournalEntry instance. |
abstract void |
shutdown()
Concrete sub-classes should probably synchronize this method, since it can be called either from the JournalConsumerThread or from the Server. |
| Methods inherited from class org.fcrepo.server.journal.xmlhelpers.AbstractXmlReader |
|---|
advancePastWhitespace, getNotCharactersException, getNotEndTagException, getNotNextMemberOrEndOfGroupException, getNotStartTagException, getOptionalAttributeValue, getRequiredAttributeValue, isEndTagEvent, isStartTagEvent, readCharactersUntilEndTag, readStartTag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Map<String,String> parameters
protected final String role
protected final JournalRecoveryLog recoveryLog
protected final ServerInterface server
| Constructor Detail |
|---|
protected JournalReader(Map<String,String> parameters,
String role,
JournalRecoveryLog recoveryLog,
ServerInterface server)
throws JournalException
JournalException| Method Detail |
|---|
public static JournalReader getInstance(Map<String,String> parameters,
String role,
JournalRecoveryLog recoveryLog,
ServerInterface server)
throws ModuleInitializationException
ModuleInitializationException
public abstract void shutdown()
throws JournalException
JournalException
public abstract ConsumerJournalEntry readJournalEntry()
throws JournalException,
XMLStreamException
readJournalEntry(XMLEventReader). It is likely that this method
should be synchronized also, since it could be called from
JournalConsumerThread when the server calls shutdown()
JournalException
XMLStreamException
protected void checkRepositoryHash(String hash)
throws JournalException
JournalException
protected ConsumerJournalEntry readJournalEntry(XMLEventReader reader)
throws JournalException,
XMLStreamException
ConsumerJournalEntry instance. Concrete sub-classes should
insure that the XMLEventReader is positioned at the beginning of a
JournalEntry before calling this method.
JournalException
XMLStreamException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||