public static class FileTxnLog.FileTxnIterator extends Object implements TxnLog.TxnIterator
| Constructor and Description |
|---|
FileTxnLog.FileTxnIterator(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(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
|
public FileTxnLog.FileTxnIterator(File logDir, long zxid) throws IOException
logDir - the transaction database directoryzxid - the zxid to start reading fromIOExceptionprotected void inStreamCreated(org.apache.jute.InputArchive ia,
InputStream is)
throws IOException
ia - the inputarchive to be read fromis - the inputstreamIOExceptionprotected 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.TxnIteratorpublic void close()
throws IOException
close in interface TxnLog.TxnIteratorIOExceptionCopyright © 2014 The Apache Software Foundation