|
||||||||||
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(java.io.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(java.io.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,
java.io.InputStream is)
read the header fomr the inputarchive |
protected java.util.zip.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(java.io.File logDir, long zxid) throws java.io.IOException
logDir
- the transaction database directoryzxid
- the zxid to start reading from
java.io.IOException
Method Detail |
---|
protected void inStreamCreated(org.apache.jute.InputArchive ia, java.io.InputStream is) throws java.io.IOException
ia
- the inputarchive to be read fromis
- the inputstream
java.io.IOException
protected org.apache.jute.InputArchive createInputArchive(java.io.File logFile) throws java.io.IOException
ia
- input archiveis
- file input stream associated with the input archive.
java.io.IOException
protected java.util.zip.Checksum makeChecksumAlgorithm()
public boolean next() throws java.io.IOException
next
in interface TxnLog.TxnIterator
java.io.IOException
public TxnHeader getHeader()
getHeader
in interface TxnLog.TxnIterator
public org.apache.jute.Record getTxn()
getTxn
in interface TxnLog.TxnIterator
public void close() throws java.io.IOException
close
in interface TxnLog.TxnIterator
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |