Class TwoValuesContainer.ContainerShortBatchIter
java.lang.Object
com.illumon.iris.db.v2.utils.rsp.container.TwoValuesContainer.ContainerShortBatchIter
- All Implemented Interfaces:
ContainerShortBatchIterator
- Enclosing class:
- TwoValuesContainer
public static final class TwoValuesContainer.ContainerShortBatchIter extends Object implements ContainerShortBatchIterator
-
Constructor Summary
Constructors Constructor Description ContainerShortBatchIter(TwoValuesContainer c, int skip) -
Method Summary
Modifier and Type Method Description booleanforEach(ShortConsumer sc)Starting from the next iterator position (if any), feed values to the consumer until it returns false.intnext(short[] buffer, int offset, int maxCount)Writes to buffer the next batch of values, and returns how much of the buffer was used.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.v2.utils.rsp.container.ContainerShortBatchIterator
hasNext
-
Constructor Details
-
Method Details
-
next
public int next(short[] buffer, int offset, int maxCount)Description copied from interface:ContainerShortBatchIteratorWrites to buffer the next batch of values, and returns how much of the buffer was used.- Specified by:
nextin interfaceContainerShortBatchIterator- Parameters:
buffer- the buffer to write values onto.offset- first position to start writing in buffer.maxCount- max number of elements to write to buffer.- Returns:
- how many values were written.
-
forEach
Description copied from interface:ContainerShortBatchIteratorStarting from the next iterator position (if any), feed values to the consumer until it returns false. After each value is consumed, the current iterator position is moving forward; eg, a call to forEach that consumes 4 elements effectively works as if next was called 4 times.- Specified by:
forEachin interfaceContainerShortBatchIterator- Parameters:
sc- a ShortConsumer to feed values to.- Returns:
- false if the processing was stopped by the consumer returning false, true otherwise.
-