|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.zookeeper.server.persistence.FileTxnLog.FileTxnIterator
public static class FileTxnLog.FileTxnIterator
this class implements the txnlog iterator interface which is used for reading the transaction logs
| Constructor Summary | |
|---|---|
FileTxnLog.FileTxnIterator(File logDir,
long zxid)
create an iterator over a transaction database directory |
|
| Method Summary | |
|---|---|
void |
close()
close the iterator and release the resources. |
protected org.apache.jute.InputArchive |
createInputArchive(File logFile)
Invoked to indicate that the input stream has been created. |
TxnHeader |
getHeader()
reutrn the current header |
org.apache.jute.Record |
getTxn()
return the current transaction |
protected void |
inStreamCreated(org.apache.jute.InputArchive ia,
InputStream is)
read the header from the inputarchive |
protected Checksum |
makeChecksumAlgorithm()
create a checksum algorithm |
boolean |
next()
the iterator that moves to the next transaction |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileTxnLog.FileTxnIterator(File logDir,
long zxid)
throws IOException
logDir - the transaction database directoryzxid - the zxid to start reading from
IOException| Method Detail |
|---|
protected void inStreamCreated(org.apache.jute.InputArchive ia,
InputStream is)
throws IOException
ia - the inputarchive to be read fromis - the inputstream
IOException
protected org.apache.jute.InputArchive createInputArchive(File logFile)
throws IOException
ia - input archiveis - file input stream associated with the input archive.
IOExceptionprotected Checksum makeChecksumAlgorithm()
public boolean next()
throws IOException
next in interface TxnLog.TxnIteratorIOExceptionpublic TxnHeader getHeader()
getHeader in interface TxnLog.TxnIteratorpublic org.apache.jute.Record getTxn()
getTxn in interface TxnLog.TxnIterator
public void close()
throws IOException
close in interface TxnLog.TxnIteratorIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||