|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfedora.server.journal.xmlhelpers.AbstractXmlReader
fedora.server.journal.JournalReader
public abstract class JournalReader
Title: JournalReader.java
Description: 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 java.util.Map<java.lang.String,java.lang.String> |
parameters
|
protected JournalRecoveryLog |
recoveryLog
|
protected java.lang.String |
role
|
protected ServerInterface |
server
|
| Constructor Summary | |
|---|---|
protected |
JournalReader(java.util.Map<java.lang.String,java.lang.String> parameters,
java.lang.String role,
JournalRecoveryLog recoveryLog,
ServerInterface server)
Concrete sub-classes must implement this constructor. |
| Method Summary | |
|---|---|
protected void |
checkRepositoryHash(java.lang.String hash)
Compare the repository hash from the journal file with the current hash obtained from the server. |
static JournalReader |
getInstance(java.util.Map<java.lang.String,java.lang.String> parameters,
java.lang.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(javax.xml.stream.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 fedora.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 java.util.Map<java.lang.String,java.lang.String> parameters
protected final java.lang.String role
protected final JournalRecoveryLog recoveryLog
protected final ServerInterface server
| Constructor Detail |
|---|
protected JournalReader(java.util.Map<java.lang.String,java.lang.String> parameters,
java.lang.String role,
JournalRecoveryLog recoveryLog,
ServerInterface server)
throws JournalException
JournalException| Method Detail |
|---|
public static JournalReader getInstance(java.util.Map<java.lang.String,java.lang.String> parameters,
java.lang.String role,
JournalRecoveryLog recoveryLog,
ServerInterface server)
throws ModuleInitializationException
ModuleInitializationException
public abstract void shutdown()
throws JournalException
JournalException
public abstract ConsumerJournalEntry readJournalEntry()
throws JournalException,
javax.xml.stream.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
javax.xml.stream.XMLStreamException
protected void checkRepositoryHash(java.lang.String hash)
throws JournalException
JournalException
protected ConsumerJournalEntry readJournalEntry(javax.xml.stream.XMLEventReader reader)
throws JournalException,
javax.xml.stream.XMLStreamException
ConsumerJournalEntry instance. Concrete sub-classes should
insure that the XMLEventReader is positioned at the beginning of a
JournalEntry before calling this method.
JournalException
javax.xml.stream.XMLStreamException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||