Class SingleSegmentLogicalRecordsIterator
- java.lang.Object
-
- org.apache.ignite.internal.util.lang.GridIteratorAdapter<T>
-
- org.apache.ignite.internal.util.GridCloseableIteratorAdapter<IgniteBiTuple<WALPointer,WALRecord>>
-
- org.apache.ignite.internal.processors.cache.persistence.wal.AbstractWalRecordsIterator
-
- org.apache.ignite.internal.processors.cache.persistence.wal.SingleSegmentLogicalRecordsIterator
-
- All Implemented Interfaces:
Serializable,AutoCloseable,Iterable<IgniteBiTuple<WALPointer,WALRecord>>,Iterator<IgniteBiTuple<WALPointer,WALRecord>>,WALIterator,GridSerializableIterator<IgniteBiTuple<WALPointer,WALRecord>>,GridCloseableIterator<IgniteBiTuple<WALPointer,WALRecord>>,GridIterator<IgniteBiTuple<WALPointer,WALRecord>>,IgniteSpiCloseableIterator<IgniteBiTuple<WALPointer,WALRecord>>
public class SingleSegmentLogicalRecordsIterator extends AbstractWalRecordsIterator
Iterates over logical records of one WAL segment from archive. Used for WAL archive compression. Doesn't deserialize actual record data, returnsMarshalledRecordinstances instead.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.ignite.internal.processors.cache.persistence.wal.AbstractWalRecordsIterator
AbstractWalRecordsIterator.AbstractFileDescriptor, AbstractWalRecordsIterator.AbstractReadFileHandle
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.persistence.wal.AbstractWalRecordsIterator
curRec, curWalSegmIdx, highBound, ioFactory, log, sharedCtx
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadvance()Switches records iterator to the next record.protected AbstractWalRecordsIterator.AbstractReadFileHandleadvanceSegment(@Nullable AbstractWalRecordsIterator.AbstractReadFileHandle curWalSegment)Switches records iterator to the next WAL segment as result of this method, new reference to segment should be returned.protected AbstractWalRecordsIterator.AbstractReadFileHandlecreateReadFileHandle(SegmentIO fileIO, RecordSerializer ser, FileInput in)-
Methods inherited from class org.apache.ignite.internal.processors.cache.persistence.wal.AbstractWalRecordsIterator
advanceRecord, closeCurrentWalSegment, handleRecordException, initReadHandle, initReadHandle, lastRead, onClose, onHasNext, onNext, postProcessRecord, validateTailReachedException
-
Methods inherited from class org.apache.ignite.internal.util.GridCloseableIteratorAdapter
checkClosed, close, hasNextX, isClosed, nextX, onRemove, removeX
-
Methods inherited from class org.apache.ignite.internal.util.lang.GridIteratorAdapter
hasNext, iterator, next, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.util.lang.GridCloseableIterator
close, isClosed
-
Methods inherited from interface org.apache.ignite.internal.util.lang.GridIterator
hasNextX, nextX, removeX
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Method Detail
-
advanceSegment
protected AbstractWalRecordsIterator.AbstractReadFileHandle advanceSegment(@Nullable @Nullable AbstractWalRecordsIterator.AbstractReadFileHandle curWalSegment) throws IgniteCheckedException
Switches records iterator to the next WAL segment as result of this method, new reference to segment should be returned. Null for current handle means stop of iteration.- Specified by:
advanceSegmentin classAbstractWalRecordsIterator- Parameters:
curWalSegment- current open WAL segment or null if there is no open segment yet- Returns:
- new WAL segment to read or null for stop iteration
- Throws:
IgniteCheckedException- if reading failed
-
advance
protected void advance() throws IgniteCheckedExceptionSwitches records iterator to the next record.AbstractWalRecordsIterator.curRecwill be updated.- If end of
segment reached, switch to new segment is called.
AbstractWalRecordsIterator.currWalSegmentwill be updated.
advance()runs a step aheadGridIteratorAdapter.next()- Overrides:
advancein classAbstractWalRecordsIterator- Throws:
IgniteCheckedException- If failed.
-
createReadFileHandle
protected AbstractWalRecordsIterator.AbstractReadFileHandle createReadFileHandle(SegmentIO fileIO, RecordSerializer ser, FileInput in)
- Specified by:
createReadFileHandlein classAbstractWalRecordsIterator
-
-