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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.activeviam.column.impl.LazyChunkedColumn
DEFAULT_CHUNK_SIZE
-
-
Constructor Summary
Constructors Constructor Description LazyChunkedCompositeColumn()Empty constructor for serialization.LazyChunkedCompositeColumn(IUserDefinedAggregation aggregation, int chunkSize, boolean isTransient, IAllocationSettings allocationSettings)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopy(int row, IArrayReader value)Copies the values of thearrayin the specifiedrows.IArrayCursorcreateArrayCursor()Creates a new read-only cursor that can be moved up and down the array.ICompositeColumnCursorcreateCursor()Creates a new cursor on this column.IChunkCompositegetChunk(int row)Gets the chunk containing the givenrow.booleanisNull(int row)Gets whethernullis stored in a given row at a given position.Kread(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.voidreadExternal(ObjectInput in)floatreadFloat(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.voidwriteExternal(ObjectOutput out)-
Methods inherited from class com.activeviam.column.LazyChunkedColumnWithAggregation
getAggregation
-
Methods inherited from class com.activeviam.column.impl.ChunkedColumn
getAllocationSettings, getDecoratedValue, isTransient, setDecoratedValue
-
Methods 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, writeLong
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.qfs.chunk.IArrayReader
readVector
-
Methods inherited from interface com.qfs.chunk.IArrayWriter
addDouble, addFloat, addInt, addLong, write, writeBoolean, writeDouble, writeFloat, writeInt, writeLong
-
-
-
-
Constructor Detail
-
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 Detail
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classLazyChunkedColumnWithAggregation<K>- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classLazyChunkedColumnWithAggregation<K>- Throws:
IOExceptionClassNotFoundException
-
read
public K read(int row)
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
public ICompositeColumnCursor 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
public IChunkComposite getChunk(int row)
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
public void copy(int row, IArrayReader value)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
public 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 interfaceIWritableArray- Overrides:
createArrayCursorin classChunkedColumn<K>- Returns:
- the cursor, stationed at index 0 of the array
-
-