Package com.qfs.chunk
Interface IChunkComposite
-
- All Superinterfaces:
IArray,IArrayReader,IArrayWriter,ICanCollectVectors<IArrayReader>,IChunk<IArrayReader>,IMemoryMonitored,IWritableArray,Serializable
- All Known Implementing Classes:
ChunkComposite,ChunkCompositeSparse
public interface IChunkComposite extends ICanCollectVectors<IArrayReader>, Serializable
Interface for chunks used for performing user-defined aggregations.These chunks can store several typed values in one position.
- Author:
- ActiveViam
-
-
Field Summary
-
Fields inherited from interface com.qfs.chunk.IChunk
NO_SIZE_LIMIT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcopy(int position, IArrayReader array)Copies the values of thearrayin the specifiedrows.default IArrayCursorcreateArrayCursor()Creates a new read-only cursor that can be moved up and down the array.default voidfindRowsEqualTo(Object value, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with the sought object in the chunk.default voidfindRowsEqualTo(Object value, long epoch, IChunkLong version, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with the sought object in the chunk.default voidfindRowsEqualTo(Object value, IIntIterator filter, int offset, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with the sought object in the chunk.default voidfindRowsInSet(Set<Object> values, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.default voidfindRowsInSet(Set<Object> values, long epoch, IChunkLong version, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.default voidfindRowsInSet(Set<Object> values, IIntIterator filter, int offset, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.default voidfindRowsInTransactionEqualTo(Object value, IIntIterator filter, IBitmap deletions, int offset, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with the sought object in the chunk.default voidfindRowsInTransactionEqualTo(Object value, IChunkLong version, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with the sought object in the chunk.default voidfindRowsInTransactionEqualTo(Object value, IChunkLong version, IBitmap deletions, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with the sought object in the chunk.default voidfindRowsInTransactionInSet(Set<Object> values, IIntIterator filter, IBitmap deletions, int offset, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.default voidfindRowsInTransactionInSet(Set<Object> values, IChunkLong version, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.default voidfindRowsInTransactionInSet(Set<Object> values, IChunkLong version, IBitmap deletions, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.intgetColumnCount()Gets the number of values that are stored in a position.voidmoveCursor(IInternalCompositeColumnCursor cursor, int position)Method used tomovea cursor.default booleanreadBoolean(int position)Reads a boolean primitive value from the array.default doublereadDouble(int position)Reads a double primitive value from the array.default intreadInt(int position)Reads an int primitive value from the array.default longreadLong(int position)Reads a long primitive value from the array.Object[]readRow(int position)Performs a read operation on the underlying chunkset of this chunk.default voidwrite(int position, Object value)Writes a piece of data at a position in the array.-
Methods inherited from interface com.qfs.chunk.IArrayReader
isNull, readFloat, readVector
-
Methods inherited from interface com.qfs.chunk.IArrayWriter
addDouble, addFloat, addInt, addLong, writeBoolean, writeDouble, writeFloat, writeInt, writeLong
-
Methods inherited from interface com.qfs.chunk.ICanCollectVectors
canCollectVectors, collectVectors
-
Methods inherited from interface com.qfs.chunk.IChunk
capacity, compress, copyInto, createFrequentValueChunk, destroy, freeRow, getBindingType, getChunkCreatorForSparse, getChunkId, getChunkType, getPhysicalSize, isDead, isPrimitive, localRow, read, replaceBy, reset, sparseChunkCompression, transfer, writeFromCell
-
Methods inherited from interface com.qfs.monitoring.memory.IMemoryMonitored
getMemoryStatistic
-
-
-
-
Method Detail
-
copy
void copy(int position, IArrayReader array)Copies the values of thearrayin the specifiedrows.- Parameters:
position- the position where to copy the valuesarray- the object containing the values to copy
-
moveCursor
void moveCursor(IInternalCompositeColumnCursor cursor, int position)
Method used tomovea cursor.- Parameters:
cursor- the cursor to moveposition- the position to move at
-
getColumnCount
int getColumnCount()
Gets the number of values that are stored in a position.- Returns:
- the number of values that are stored in a position
-
readRow
Object[] readRow(int position)
Performs a read operation on the underlying chunkset of this chunk.This method must only be called within tests.
- Parameters:
position- position at which we read the values in the underlying chunkset- Returns:
- the values stored in the underlying chunks at the given position
-
write
default void write(int position, Object value)Description copied from interface:IArrayWriterWrites a piece of data at a position in the array.For better performance, use the primitive type operations.
- Specified by:
writein interfaceIArrayWriter- Parameters:
position- 0-based index in the arrayvalue- the value to write
-
findRowsEqualTo
default void findRowsEqualTo(Object value, long epoch, IChunkLong version, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with the sought object in the chunk.- Specified by:
findRowsEqualToin interfaceIChunk<IArrayReader>- Parameters:
value- the sought objectepoch- the epoch will define which rows are read. Only rows created before or deleted after this epoch will be readversion- the column holding the version number at which each row has been inserted or removedoffset- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with the sought object
-
findRowsEqualTo
default void findRowsEqualTo(Object value, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with the sought object in the chunk.- Specified by:
findRowsEqualToin interfaceIChunk<IArrayReader>- Parameters:
value- the sought objectoffset- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with the sought object
-
findRowsEqualTo
default void findRowsEqualTo(Object value, IIntIterator filter, int offset, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with the sought object in the chunk.- Specified by:
findRowsEqualToin interfaceIChunk<IArrayReader>- Parameters:
value- the sought objectfilter- all the row numbers that should be considered for this researchoffset- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkmapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with the sought object
-
findRowsInSet
default void findRowsInSet(Set<Object> values, IIntIterator filter, int offset, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.- Specified by:
findRowsInSetin interfaceIChunk<IArrayReader>- Parameters:
values- the set of sought objectsfilter- all the row numbers that should be considered for this researchoffset- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkmapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with any object in the set of sought objects
-
findRowsInSet
default void findRowsInSet(Set<Object> values, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.- Specified by:
findRowsInSetin interfaceIChunk<IArrayReader>- Parameters:
values- the set of sought objectsoffset- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with any object in the set of sought objects
-
findRowsInSet
default void findRowsInSet(Set<Object> values, long epoch, IChunkLong version, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.- Specified by:
findRowsInSetin interfaceIChunk<IArrayReader>- Parameters:
values- the set of sought objectsepoch- the epoch will define which rows are read, only rows created before or deleted after this epoch will be readversion- the column holding the version number at which each row has been inserted or removedoffset- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with any object in the set of sought objects
-
findRowsInTransactionEqualTo
default void findRowsInTransactionEqualTo(Object value, IChunkLong version, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with the sought object in the chunk.- Specified by:
findRowsInTransactionEqualToin interfaceIChunk<IArrayReader>- Parameters:
value- the sought objectversion- the column holding the version number at which each row has been inserted or removed corresponding to this chunkoffset- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with the sought object
-
findRowsInTransactionEqualTo
default void findRowsInTransactionEqualTo(Object value, IChunkLong version, IBitmap deletions, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with the sought object in the chunk.- Specified by:
findRowsInTransactionEqualToin interfaceIChunk<IArrayReader>- Parameters:
value- the sought objectversion- the column holding the version number at which each row has been inserted or removed corresponding to this chunkdeletions- a bitmap of deleted rows, that should not be scannedoffset- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with the sought object
-
findRowsInTransactionEqualTo
default void findRowsInTransactionEqualTo(Object value, IIntIterator filter, IBitmap deletions, int offset, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with the sought object in the chunk.- Specified by:
findRowsInTransactionEqualToin interfaceIChunk<IArrayReader>- Parameters:
value- the sought objectfilter- all the row numbers that should be considered for this researchdeletions- a bitmap of deleted rows, that should not be scannedoffset- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkmapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with the sought object
-
findRowsInTransactionInSet
default void findRowsInTransactionInSet(Set<Object> values, IIntIterator filter, IBitmap deletions, int offset, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.- Specified by:
findRowsInTransactionInSetin interfaceIChunk<IArrayReader>- Parameters:
values- the set of sought objectsfilter- all the row numbers that should be considered for this researchdeletions- a bitmap of deleted rows, that should not be scannedoffset- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkmapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with any object in the set of sought objects
-
findRowsInTransactionInSet
default void findRowsInTransactionInSet(Set<Object> values, IChunkLong version, IBitmap deletions, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.- Specified by:
findRowsInTransactionInSetin interfaceIChunk<IArrayReader>- Parameters:
values- the set of sought objectsversion- the column holding the version number at which each row has been inserted or removed corresponding to this chunkdeletions- a bitmap of deleted rows, that should not be scannedoffset- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with any object in the set of sought objects
-
findRowsInTransactionInSet
default void findRowsInTransactionInSet(Set<Object> values, IChunkLong version, int offset, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.- Specified by:
findRowsInTransactionInSetin interfaceIChunk<IArrayReader>- Parameters:
values- the set of sought objectsversion- the column holding the version number at which each row has been inserted or removed corresponding to this chunkoffset- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with any object in the set of sought objects
-
readInt
default int readInt(int position)
Description copied from interface:IArrayReaderReads an int primitive value from the array.An exception is thrown if the value is not of the right type.
- Specified by:
readIntin interfaceIArrayReader- Parameters:
position- 0-based index in an array- Returns:
- int value
-
readDouble
default double readDouble(int position)
Description copied from interface:IArrayReaderReads a double primitive value from the array.An exception is thrown if the value is not of the right type.
- Specified by:
readDoublein interfaceIArrayReader- Parameters:
position- 0-based index in an array- Returns:
- double value
-
readLong
default long readLong(int position)
Description copied from interface:IArrayReaderReads a long primitive value from the array.An exception is thrown if the value is not of the right type.
- Specified by:
readLongin interfaceIArrayReader- Parameters:
position- 0-based index in an array- Returns:
- long value
-
readBoolean
default boolean readBoolean(int position)
Description copied from interface:IArrayReaderReads a boolean primitive value from the array.An exception is thrown if the value is not of the right type.
- Specified by:
readBooleanin interfaceIArrayReader- Parameters:
position- 0-based index in an array- Returns:
- boolean value
-
createArrayCursor
default IArrayCursor createArrayCursor()
Description copied from interface:IArrayCreates a new read-only cursor that can be moved up and down the array. This cursor delegates all reading calls to the underlying array.- Specified by:
createArrayCursorin interfaceIArray- Specified by:
createArrayCursorin interfaceIChunk<IArrayReader>- Specified by:
createArrayCursorin interfaceIWritableArray- Returns:
- the cursor, stationed at index 0 of the array
-
-