public static class FileTxnLog.FileTxnIterator extends Object implements TxnLog.TxnIterator
Constructor and Description |
---|
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 FileTxnIterator(File logDir, long zxid) throws IOException
logDir
- the transaction database directoryzxid
- the zxid to start reading fromIOException
protected void inStreamCreated(org.apache.jute.InputArchive ia, InputStream is) throws IOException
ia
- the inputarchive to be read fromis
- the inputstreamIOException
protected org.apache.jute.InputArchive createInputArchive(File logFile) throws IOException
ia
- input archiveis
- file input stream associated with the input archive.IOException
protected Checksum makeChecksumAlgorithm()
public boolean next() throws IOException
next
in interface TxnLog.TxnIterator
IOException
public TxnHeader getHeader()
getHeader
in interface TxnLog.TxnIterator
public org.apache.jute.Record getTxn()
getTxn
in interface TxnLog.TxnIterator
public void close() throws IOException
close
in interface TxnLog.TxnIterator
IOException
Copyright © 2016 The Apache Software Foundation