public static class FileTxnLog.FileTxnIterator extends java.lang.Object implements TxnLog.TxnIterator
| Constructor and Description |
|---|
FileTxnIterator(java.io.File logDir,
long zxid)
create an iterator over a transaction database directory
|
| Modifier and Type | Method and Description |
|---|---|
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 from the inputarchive
|
protected java.util.zip.Checksum |
makeChecksumAlgorithm()
create a checksum algorithm
|
boolean |
next()
the iterator that moves to the next transaction
|
public FileTxnIterator(java.io.File logDir,
long zxid)
throws java.io.IOException
logDir - the transaction database directoryzxid - the zxid to start reading fromjava.io.IOExceptionprotected void inStreamCreated(org.apache.jute.InputArchive ia,
java.io.InputStream is)
throws java.io.IOException
ia - the inputarchive to be read fromis - the inputstreamjava.io.IOExceptionprotected 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.IOExceptionprotected java.util.zip.Checksum makeChecksumAlgorithm()
public boolean next()
throws java.io.IOException
next in interface TxnLog.TxnIteratorjava.io.IOExceptionpublic TxnHeader getHeader()
getHeader in interface TxnLog.TxnIteratorpublic org.apache.jute.Record getTxn()
getTxn in interface TxnLog.TxnIteratorpublic void close()
throws java.io.IOException
close in interface TxnLog.TxnIteratorjava.io.IOExceptionCopyright © 2016 The Apache Software Foundation