public static class FileTxnLog.FileTxnIterator extends java.lang.Object implements TxnLog.TxnIterator
Constructor and Description |
---|
FileTxnLog.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 FileTxnLog.FileTxnIterator(java.io.File logDir, long zxid) throws java.io.IOException
logDir
- the transaction database directoryzxid
- the zxid to start reading fromjava.io.IOException
protected 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.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
Copyright © 2013 The Apache Software Foundation