content
[0, cardinality). The last element is reserved: it
never holds a value, so a container's capacity is content.length - 1, and it is where the array's
shared flag lives; see getContent().RspArray.SpanViewprotected intprotected short[][0, cardinality).static final intContainerNames, DEBUG, MAX_RANGE, MAX_VALUE, threadLocalBuf ArrayContainer(int capacity) protected ArrayContainer(short[] content,
int cardinality) makeByWrapping(short[], int) and for subclasses that install their content
later.add(int begin,
int end) static short[]allocateContent(int capacity) capacity values, for a caller that fills it and then hands
it to makeByWrapping(short[], int): the values go at indices [0, capacity), and the array's
reserved last slot and any rounding padding beyond them are already in place.and(ArrayContainer value2) and(RunContainer x) andNot(ArrayContainer value2) andNot(BitmapContainer value2) andRange(int start,
int end) intintbooleancontains(int rangeStart,
int rangeEnd) booleancontains(short x) protected booleancontains(ArrayContainer arrayContainer) protected booleancontains(BitmapContainer bitmapContainer) protected booleancontains(RunContainer runContainer) cowRef()deepCopy()intfind(short x) booleanfindRanges(RangeConsumer outPositions,
RangeIterator inValues,
int maxPos) intfirst()booleanforEach(int rankOffset,
ShortConsumer sc) booleanforEach(ShortConsumer sc) booleanforEachRange(int rankOffset,
ShortRangeConsumer sc) intshort[]io.deephaven.engine.rowset.impl.rsp.RspArray does to avoid an object per small container.getShortBatchIterator(int skipCount) io.deephaven.engine.rowset.impl.rsp.container.ArrayContainer.ShortForwardIteratorgetShortRangeIterator(int initialSeek) iadd(int begin,
int end) iand(ArrayContainer value2) iand(BitmapContainer value2) iand(RunContainer x) iandNot(ArrayContainer value2) iandNot(BitmapContainer value2) iandRange(int start,
int end) iappend(int begin,
int end) iflip(short x) inot(int firstOfRange,
int exclusiveEndOfRange) ior(ArrayContainer value2) ior(RunContainer x) iremove(int begin,
int end) booleanstatic booleanisContentShared(short[] content) getContent().booleanisEmpty()iset(short x) booleanisShared()iunset(short x) ixor(ArrayContainer value2) ixor(RunContainer x) intlast()protected voidloadData(BitmapContainer bitmapContainer) protected voidloadDataWithSkipValue(BitmapContainer bitmapContainer,
short valueToSkip,
PositionHint positionHintOut) static ArrayContainermakeByCopying(int newCapacity,
short[] arr,
int offset,
int sz) static ArrayContainermakeByCopying(short[] arr,
int offset,
int sz) static ArrayContainermakeByWrapping(short[] arr,
int sz) static voidmarkContentShared(short[] content) getContent().intnextValue(short fromValue) not(int firstOfRange,
int lastOfRange) or(ArrayContainer value2) or(RunContainer x) protected Containeror(ShortIterator it) booleanbooleanbooleanbooleanoverlapsRange(int rangeStart,
int rangeEnd) intrank(short lowbits) remove(int begin,
int end) shortselect(int j) select(int startRank,
int endRank) voidselectRanges(RangeConsumer outValues,
RangeIterator inPositions) set(short x) final voidbooleanbooleanbooleanvoidtrim()unset(short x) voidvalidate()xor(ArrayContainer value2) xor(RunContainer x) protected Containerxor(ShortIterator it) and, andNot, check, contains, empty, emptySizedFor, full, getContainerName, getShortRangeIterator, iand, iandNot, ifDebugValidate, intersects, intersects, ior, isFull, isSingleElement, ixor, numberOfRanges, or, overlaps, rangeOfOnes, remove, singleRange, singleton, subsetOf, toString, twoRanges, twoValues, xor[0, cardinality). The last element is reserved: it
never holds a value, so a container's capacity is content.length - 1, and it is where the array's
shared flag lives; see getContent().makeByWrapping(short[], int) and for subclasses that install their content
later.capacity - The capacity of the containerio.deephaven.engine.rowset.impl.rsp.RspArray does to avoid an object per small container. The array
stands on its own: its values occupy indices [0, cardinality), and its last element is reserved for the
shared flag rather than a value, so a holder of the bare array can mark it
shared or ask whether it is, without a container object to hold the flag.
The flag lives in the array, rather than in a word beside it, so that marking it is a write to the array itself and to nothing else: whoever holds a reference to the array can only ever affect that array by marking it, never a span the array's owner has since replaced it with. The flag is only ever set, never cleared; a shared array is never again written in place by anyone, so a stale set flag costs at most one copy.
capacity values, for a caller that fills it and then hands
it to makeByWrapping(short[], int): the values go at indices [0, capacity), and the array's
reserved last slot and any rounding padding beyond them are already in place.capacity - the number of values the array must be able to holdarr - array with values in increasing unsigned short order.offset - index position for the first element to take.sz - number of elements to read from the array.arr - array with values in increasing unsigned short order, with at least one element beyond them for the
container's reserved last slot; whether that slot is marked shared is taken as is. The container takes
ownership of this array.sz - number of values in arr.ContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerThis operation allows for cheap read-only references to the same values, at the cost of an additional copy for any first mutation.
ContainerContainerContainerContainerContainerContainergetCardinality in class ContainerContainergetReverseShortIterator in class ContainerContainergetShortIterator in class ContainerContainergetShortBatchIterator in class ContainerskipCount - number of elements to skip from the start of the container.ContainergetShortRangeIterator in class ContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerrunOptimize in class ContainerContainerContainerContainerfind in class Containerx - value to search for
For values of x that Container.contains(short) returns
true, this method returns one less than
Container.rank(short): rank counts the values less than
or equal to x, while this is the zero-based position of x itself.
ContainerselectRanges in class ContaineroutValues - accept is called in this consumer for each resulting range.inPositions - input iterator that provides the position ranges.ContainerContainerContainerfindRanges in class ContaineroutPositions - accept is called in this consumer for each resulting position range.inValues - input iterator that provides the key ranges; these must each exist in the container.maxPos - maximum position to add to outPositions; values of position > maxPos are not added.toBitmapContainer in class ContainerContainerContainerContainerContainerContainerContainerContainerContainerContainerforEachRange in class ContaineroverlapsRange in class ContainerrangeStart - the beginning of the range, as an int.rangeEnd - the end of the range (exclusive), as an int.setCopyOnWrite in class ContainerbytesAllocated in class Container