T
- The type of record that the iterator handles.public class SpillingResettableMutableObjectIterator<T> extends Object implements ResettableMutableObjectIterator<T>
Modifier and Type | Field and Description |
---|---|
protected SpillingBuffer |
buffer |
protected MutableObjectIterator<T> |
input |
protected DataInputView |
inView |
protected MemoryManager |
memoryManager |
protected TypeSerializer<T> |
serializer |
Constructor and Description |
---|
SpillingResettableMutableObjectIterator(MutableObjectIterator<T> input,
TypeSerializer<T> serializer,
MemoryManager memoryManager,
IOManager ioManager,
int numPages,
AbstractInvokable parentTask) |
SpillingResettableMutableObjectIterator(MutableObjectIterator<T> input,
TypeSerializer<T> serializer,
MemoryManager memoryManager,
IOManager ioManager,
List<MemorySegment> memory) |
Modifier and Type | Method and Description |
---|---|
List<MemorySegment> |
close() |
void |
consumeAndCacheRemainingData() |
T |
next()
Gets the next element from the collection.
|
T |
next(T reuse)
Gets the next element from the collection.
|
void |
open() |
void |
reset()
Resets the iterator.
|
protected DataInputView inView
protected final TypeSerializer<T> serializer
protected final SpillingBuffer buffer
protected final MutableObjectIterator<T> input
protected final MemoryManager memoryManager
public SpillingResettableMutableObjectIterator(MutableObjectIterator<T> input, TypeSerializer<T> serializer, MemoryManager memoryManager, IOManager ioManager, int numPages, AbstractInvokable parentTask) throws MemoryAllocationException
MemoryAllocationException
public SpillingResettableMutableObjectIterator(MutableObjectIterator<T> input, TypeSerializer<T> serializer, MemoryManager memoryManager, IOManager ioManager, List<MemorySegment> memory)
public void open()
public void reset() throws IOException
ResettableMutableObjectIterator
reset
in interface ResettableMutableObjectIterator<T>
IOException
- May be thrown when the serialization into buffers or the spilling to secondary
storage fails.public List<MemorySegment> close() throws IOException
IOException
public T next(T reuse) throws IOException
MutableObjectIterator
next
in interface MutableObjectIterator<T>
reuse
- The target object into which to place next element if E is mutable.null
if the iterator is exhausted.IOException
- Thrown, if a problem occurred in the underlying I/O layer or in the
serialization / deserialization logicpublic T next() throws IOException
MutableObjectIterator
next
in interface MutableObjectIterator<T>
null
if the iterator is exhausted.IOException
- Thrown, if a problem occurred in the underlying I/O layer or in the
serialization / deserialization logicpublic void consumeAndCacheRemainingData() throws IOException
IOException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.