Package com.activeviam.column
Class LazyChunkedCompositeColumn<K>
java.lang.Object
com.qfs.column.impl.AChunkedColumn<K,IChunk<K>>
com.activeviam.column.impl.ChunkedColumn<K>
com.activeviam.column.impl.LazyChunkedColumn<K>
com.activeviam.column.LazyChunkedColumnWithAggregation<K>
com.activeviam.column.LazyChunkedCompositeColumn<K>
- All Implemented Interfaces:
IArray,IArrayReader,IArrayWriter,IDecoratedArray<Object,,K> IVectorArrayWriter,IWritableArray,IColumn<K>,ICompositeColumn,ICompositeReadableColumn,IMemoryMonitored,Externalizable,Serializable
public class LazyChunkedCompositeColumn<K>
extends LazyChunkedColumnWithAggregation<K>
implements ICompositeColumn
A composite column with chunks.
- Author:
- ActiveViam
- See Also:
-
Field Summary
Fields inherited from class com.activeviam.column.impl.LazyChunkedColumn
DEFAULT_CHUNK_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor for serialization.LazyChunkedCompositeColumn(IUserDefinedAggregation aggregation, int chunkSize, boolean isTransient, IAllocationSettings allocationSettings) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidcopy(int row, IArrayReader value) Copies the values of thearrayin the specifiedrows.Creates a new read-only cursor that can be moved up and down the array.Creates a new cursor on this column.getChunk(int row) Gets the chunk containing the givenrow.booleanisNull(int row) Gets whethernullis stored in a given row at a given position.read(int row) Reads a value at some index in an array.booleanreadBoolean(int row) Reads a boolean primitive value from the array.doublereadDouble(int row) Reads a double primitive value from the array.voidfloatreadFloat(int row) Reads a float primitive value from the array.intreadInt(int row) Reads an int primitive value from the array.longreadLong(int row) Reads a long primitive value from the array.voidMethods inherited from class com.activeviam.column.LazyChunkedColumnWithAggregation
getAggregationMethods inherited from class com.activeviam.column.impl.ChunkedColumn
getAllocationSettings, getDecoratedValue, isTransient, setDecoratedValueMethods inherited from class com.qfs.column.impl.AChunkedColumn
addDouble, addFloat, addInt, addLong, chunkId, chunkPosition, destroy, ensureCapacity, getCapacity, getChunkCount, getChunkSize, getMemoryStatistic, getMemoryStatisticWithLimit, getWeight, growCapacity, write, writeBoolean, writeDouble, writeFloat, writeInt, writeLongMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.qfs.chunk.IArrayReader
readVectorMethods inherited from interface com.qfs.chunk.IArrayWriter
addDouble, addFloat, addInt, addLong, write, writeBoolean, writeDouble, writeFloat, writeInt, writeLong
-
Constructor Details
-
LazyChunkedCompositeColumn
public LazyChunkedCompositeColumn()Empty constructor for serialization. -
LazyChunkedCompositeColumn
public LazyChunkedCompositeColumn(IUserDefinedAggregation aggregation, int chunkSize, boolean isTransient, IAllocationSettings allocationSettings) Constructor.- Parameters:
aggregation- the aggregation that this column stores aggregates forchunkSize- the size of the underlying chunksisTransient-trueif the data stored in this column is transient (short lived),falseotherwiseallocationSettings- additional info for allocating the chunks
-
-
Method Details
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classLazyChunkedColumnWithAggregation<K>- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classLazyChunkedColumnWithAggregation<K>- Throws:
IOExceptionClassNotFoundException
-
read
Description copied from interface:IArrayReaderReads a value at some index in an array.- Specified by:
readin interfaceIArrayReader- Specified by:
readin interfaceIColumn<K>- Overrides:
readin classAChunkedColumn<K,IChunk<K>> - Parameters:
row- 0-based index in an array- Returns:
- the data stored at that position in the array
-
readInt
public int readInt(int row) 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- Overrides:
readIntin classAChunkedColumn<K,IChunk<K>> - Parameters:
row- 0-based index in an array- Returns:
- int value
-
readLong
public long readLong(int row) 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- Overrides:
readLongin classAChunkedColumn<K,IChunk<K>> - Parameters:
row- 0-based index in an array- Returns:
- long value
-
readFloat
public float readFloat(int row) Description copied from interface:IArrayReaderReads a float primitive value from the array.An exception is thrown if the value is not of the right type.
- Specified by:
readFloatin interfaceIArrayReader- Overrides:
readFloatin classAChunkedColumn<K,IChunk<K>> - Parameters:
row- 0-based index in an array- Returns:
- float value
-
readDouble
public double readDouble(int row) 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- Overrides:
readDoublein classAChunkedColumn<K,IChunk<K>> - Parameters:
row- 0-based index in an array- Returns:
- double value
-
readBoolean
public boolean readBoolean(int row) 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- Overrides:
readBooleanin classAChunkedColumn<K,IChunk<K>> - Parameters:
row- 0-based index in an array- Returns:
- boolean value
-
isNull
public boolean isNull(int row) Description copied from interface:IArrayReaderGets whethernullis stored in a given row at a given position.- Specified by:
isNullin interfaceIArrayReader- Overrides:
isNullin classAChunkedColumn<K,IChunk<K>> - Parameters:
row- 0-based index in an array- Returns:
trueif the element stored at that position isnull,falseotherwise
-
createCursor
Description copied from interface:ICompositeReadableColumnCreates a new cursor on this column.- Specified by:
createCursorin interfaceICompositeColumn- Specified by:
createCursorin interfaceICompositeReadableColumn- Returns:
- a new cursor on this column
-
getChunk
Description copied from interface:ICompositeColumnGets the chunk containing the givenrow.- Specified by:
getChunkin interfaceICompositeColumn- Parameters:
row- a row- Returns:
- the chunk containing the row
-
copy
Description copied from interface:ICompositeColumnCopies the values of thearrayin the specifiedrows.- Specified by:
copyin interfaceICompositeColumn- Parameters:
row- the position where to copy the valuesvalue- the object containing the values to copy
-
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 interfaceIWritableArray- Overrides:
createArrayCursorin classChunkedColumn<K>- Returns:
- the cursor, stationed at index 0 of the array
-