Package com.qfs.chunk
Interface IChunkSingleValue<K>
- Type Parameters:
K- the type of primitive data stored by the chunk
- All Superinterfaces:
IArray,IArrayReader,IArrayWriter,IChunk<K>,IMemoryMonitored,IWritableArray
- All Known Implementing Classes:
ChunkSingleBoolean,ChunkSingleDouble,ChunkSingleFloat,ChunkSingleInteger,ChunkSingleLong,ChunkSingleObject,ChunkSingleTimestamp,ChunkSingleVector
A chunk that stores a single value.
- Author:
- ActiveViam
-
Field Summary
Fields inherited from interface com.qfs.chunk.IChunk
NO_SIZE_LIMIT -
Method Summary
Modifier and TypeMethodDescriptiondefault IArrayCursorCreates a new read-only cursor that can be moved up and down the array.default voidfindRowsEqualTo(Object value, int chunkBase, 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 chunkBase, 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 chunkBase, 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 chunkBase, 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 chunkBase, 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 chunkBase, 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 chunkBase, 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 chunkBase, 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 chunkBase, 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 chunkBase, 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 chunkBase, 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 chunkBase, 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 voidfreeRow(int row) Clears the data stored at a given row.getValue()Returns the stored value.booleanReturns whether the value matches the value stored in the chunk or not.Methods inherited from interface com.qfs.chunk.IArrayReader
isNull, readBoolean, readDouble, readFloat, readInt, readLong, readVectorMethods inherited from interface com.qfs.chunk.IArrayWriter
addDouble, addFloat, addInt, addLong, write, writeBoolean, writeDouble, writeFloat, writeInt, writeLongMethods inherited from interface com.qfs.chunk.IChunk
capacity, compress, copyInto, createFrequentValueChunk, destroy, getBindingType, getChunkCreatorForSparse, getChunkId, getChunkType, getPhysicalSize, isDead, isPrimitive, localRow, read, replaceBy, reset, sparseChunkCompression, transfer, writeFromCellMethods inherited from interface com.qfs.monitoring.memory.IMemoryMonitored
getMemoryStatistic
-
Method Details
-
matches
Returns whether the value matches the value stored in the chunk or not.- Parameters:
value- the value to match- Returns:
trueif the value matches the value stored in the chunk,falseotherwise
-
getValue
K getValue()Returns the stored value.- Returns:
- the stored value
-
freeRow
default void freeRow(int row) Description copied from interface:IChunkClears the data stored at a given row. -
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<K>- Specified by:
createArrayCursorin interfaceIWritableArray- Returns:
- the cursor, stationed at index 0 of the array
-
findRowsEqualTo
default void findRowsEqualTo(Object value, long epoch, IChunkLong version, int chunkBase, 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<K>- 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 removedchunkBase- 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 chunkBase, 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<K>- Parameters:
value- the sought objectchunkBase- 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 chunkBase, 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<K>- Parameters:
value- the sought objectfilter- all the row numbers that should be considered for this researchchunkBase- 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, long epoch, IChunkLong version, int chunkBase, 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<K>- 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 removedchunkBase- 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, int chunkBase, 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<K>- Parameters:
values- the set of sought objectschunkBase- 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, IIntIterator filter, int chunkBase, 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<K>- Parameters:
values- the set of sought objectsfilter- all the row numbers that should be considered for this researchchunkBase- 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
-
findRowsInTransactionEqualTo
default void findRowsInTransactionEqualTo(Object value, IChunkLong version, int chunkBase, 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<K>- Parameters:
value- the sought objectversion- the column holding the version number at which each row has been inserted or removed corresponding to this chunkchunkBase- 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 chunkBase, 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<K>- 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 scannedchunkBase- 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 chunkBase, 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<K>- 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 scannedchunkBase- 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, IChunkLong version, int chunkBase, 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<K>- 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 chunkchunkBase- 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, IBitmap deletions, int chunkBase, 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<K>- 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 scannedchunkBase- 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, IIntIterator filter, IBitmap deletions, int chunkBase, 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<K>- 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 scannedchunkBase- 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
-