Class ObjectChunk<T,ATTR extends Attributes.Any>
java.lang.Object
com.illumon.iris.db.v2.sources.chunk.ChunkBase<ATTR>
com.illumon.iris.db.v2.sources.chunk.ObjectChunk<T,ATTR>
- All Implemented Interfaces:
Chunk<ATTR>
- Direct Known Subclasses:
ObjectChunkPage
,ResettableObjectChunk
,WritableObjectChunk
Chunk
implementation for Object data.-
Field Summary
Fields inherited from interface com.illumon.iris.db.v2.sources.chunk.Chunk
MAXIMUM_SIZE, SYSTEM_ARRAYCOPY_THRESHOLD, SYSTEM_ARRAYFILL_THRESHOLD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T_DERIV extends T>
ObjectChunk<T_DERIV,ATTR> static <T,
ATTR extends Attributes.Any>
ObjectChunk<T,ATTR> chunkWrap
(T[] data) static <T,
ATTR extends Attributes.Any>
ObjectChunk<T,ATTR> chunkWrap
(T[] data, int offset, int capacity) final void
copyToArray
(int srcOffset, Object dest, int destOffset, int length) Copy a subrange of this Chunk to the subrange of the 'dest' array.final void
copyToChunk
(int srcOffset, WritableChunk<? super ATTR> dest, int destOffset, int length) Copy a subrange of this Chunk to the subrange of the 'dest' writable chunk.final void
copyToTypedArray
(int srcOffset, T[] destData, int destOffset, int length) static <T,
ATTR extends Attributes.Any, ATTR_DERIV extends ATTR>
WritableObjectChunk<T,ATTR_DERIV> downcast
(WritableObjectChunk<T, ATTR> self) final T
get
(int index) final ChunkType
static <T,
ATTR extends Attributes.Any>
ObjectChunk<T,ATTR> final boolean
final boolean
static <T> T[]
makeArray
(int capacity) slice
(int offset, int capacity) Make a new Chunk that represents either exactly the same view on the underlying data as this Chunk, or a subrange of that view.Methods inherited from class com.illumon.iris.db.v2.sources.chunk.ChunkBase
internalCapacity, internalSetSize, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.Chunk
asBooleanChunk, asByteChunk, asCharChunk, asDoubleChunk, asFloatChunk, asIntChunk, asLongChunk, asObjectChunk, asShortChunk, copyToBuffer
-
Constructor Details
-
ObjectChunk
-
-
Method Details
-
getEmptyChunk
-
makeArray
public static <T> T[] makeArray(int capacity) -
chunkWrap
-
chunkWrap
public static <T,ATTR extends Attributes.Any> ObjectChunk<T,ATTR> chunkWrap(T[] data, int offset, int capacity) -
getChunkType
- Returns:
- The underlying chunk type
-
get
-
slice
Description copied from interface:Chunk
Make a new Chunk that represents either exactly the same view on the underlying data as this Chunk, or a subrange of that view. The view is defined as [0..size) (in the coordinate space of this Chunk).- Parameters:
offset
- Offset of the new Chunk, relative to this Chunk. 0 ≤ offset ≤ this.sizecapacity
- Capacity and initial size of the new Chunk. 0 ≤ capacity ≤ this.size -offset
.- Returns:
- The new Chunk. A new Chunk will always be returned, even if the Chunks represent the same view.
-
copyToChunk
public final void copyToChunk(int srcOffset, WritableChunk<? super ATTR> dest, int destOffset, int length) Description copied from interface:Chunk
Copy a subrange of this Chunk to the subrange of the 'dest' writable chunk.- Parameters:
srcOffset
- Starting position in 'this' (the source)dest
- Destination writable chunk.destOffset
- Starting offset in the destination.length
- Number of values to copy
-
copyToArray
Description copied from interface:Chunk
Copy a subrange of this Chunk to the subrange of the 'dest' array.- Parameters:
srcOffset
- Starting position in 'this' (the source)dest
- Destination array.destOffset
- Starting offset in the destination.length
- Number of values to copy
-
copyToTypedArray
-
isAlias
- Returns:
- true iff this and array are aliases, that is they refer to the same underlying data
-
isAlias
- Returns:
- true iff this and chunk are aliases, that is they refer to the same underlying data
-
asTypedObjectChunk
-
downcast
public static <T,ATTR extends Attributes.Any, WritableObjectChunk<T,ATTR_DERIV extends ATTR> ATTR_DERIV> downcast(WritableObjectChunk<T, ATTR> self)
-