Package org.HdrHistogram.packedarray
Class PackedArrayContext
- java.lang.Object
-
- org.HdrHistogram.packedarray.AbstractPackedArrayContext
-
- org.HdrHistogram.packedarray.PackedArrayContext
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ConcurrentPackedArrayContext
class PackedArrayContext extends AbstractPackedArrayContext
A non-concurrent array context. No atomics used.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.HdrHistogram.packedarray.AbstractPackedArrayContext
AbstractPackedArrayContext.NonZeroValues, AbstractPackedArrayContext.NonZeroValuesIterator
-
-
Field Summary
Fields Modifier and Type Field Description private long[]arrayprivate intpopulatedShortLength-
Fields inherited from class org.HdrHistogram.packedarray.AbstractPackedArrayContext
MAX_SUPPORTED_PACKED_COUNTS_ARRAY_LENGTH, MINIMUM_INITIAL_PACKED_ARRAY_CAPACITY
-
-
Constructor Summary
Constructors Constructor Description PackedArrayContext(int virtualLength, int initialPhysicalLength)PackedArrayContext(int virtualLength, int initialPhysicalLength, boolean allocateArray)PackedArrayContext(int virtualLength, AbstractPackedArrayContext from, int newPhysicalArrayLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) longaddAndGetAtUnpackedIndex(int index, long valueToAdd)(package private) booleancasAtLongIndex(int longIndex, long expectedValue, long newValue)(package private) booleancasPopulatedLongLength(int expectedPopulatedLongLength, int newPopulatedLongLength)(package private) booleancasPopulatedShortLength(int expectedPopulatedShortLength, int newPopulatedShortLength)(package private) voidclearContents()(package private) longgetAtLongIndex(int longIndex)(package private) longgetAtUnpackedIndex(int index)(package private) intgetPopulatedShortLength()(package private) longincrementAndGetAtUnpackedIndex(int index)(package private) voidlazySetAtLongIndex(int longIndex, long newValue)(package private) voidlazysetAtUnpackedIndex(int index, long newValue)(package private) intlength()(package private) voidresizeArray(int newLength)(package private) voidsetAtUnpackedIndex(int index, long newValue)(package private) java.lang.StringunpackedToString()-
Methods inherited from class org.HdrHistogram.packedarray.AbstractPackedArrayContext
addAtByteIndex, casAtShortIndex, determineTopLevelShiftForVirtualLength, getAtByteIndex, getAtShortIndex, getIndexAtShortIndex, getPackedIndex, getPhysicalLength, getPopulatedByteLength, getPopulatedLongLength, getTopLevelShift, getVirtualLength, init, isPacked, nonZeroValues, populateEquivalentEntriesWithZerosFromOther, setAtByteIndex, setAtShortIndex, setValuePart, setVirtualLength, toString
-
-
-
-
Constructor Detail
-
PackedArrayContext
PackedArrayContext(int virtualLength, int initialPhysicalLength, boolean allocateArray)
-
PackedArrayContext
PackedArrayContext(int virtualLength, int initialPhysicalLength)
-
PackedArrayContext
PackedArrayContext(int virtualLength, AbstractPackedArrayContext from, int newPhysicalArrayLength)
-
-
Method Detail
-
length
int length()
- Specified by:
lengthin classAbstractPackedArrayContext
-
getPopulatedShortLength
int getPopulatedShortLength()
- Specified by:
getPopulatedShortLengthin classAbstractPackedArrayContext
-
casPopulatedShortLength
boolean casPopulatedShortLength(int expectedPopulatedShortLength, int newPopulatedShortLength)- Specified by:
casPopulatedShortLengthin classAbstractPackedArrayContext
-
casPopulatedLongLength
boolean casPopulatedLongLength(int expectedPopulatedLongLength, int newPopulatedLongLength)- Specified by:
casPopulatedLongLengthin classAbstractPackedArrayContext
-
getAtLongIndex
long getAtLongIndex(int longIndex)
- Specified by:
getAtLongIndexin classAbstractPackedArrayContext
-
casAtLongIndex
boolean casAtLongIndex(int longIndex, long expectedValue, long newValue)- Specified by:
casAtLongIndexin classAbstractPackedArrayContext
-
lazySetAtLongIndex
void lazySetAtLongIndex(int longIndex, long newValue)- Specified by:
lazySetAtLongIndexin classAbstractPackedArrayContext
-
clearContents
void clearContents()
- Specified by:
clearContentsin classAbstractPackedArrayContext
-
resizeArray
void resizeArray(int newLength)
- Specified by:
resizeArrayin classAbstractPackedArrayContext
-
getAtUnpackedIndex
long getAtUnpackedIndex(int index)
- Specified by:
getAtUnpackedIndexin classAbstractPackedArrayContext
-
setAtUnpackedIndex
void setAtUnpackedIndex(int index, long newValue)- Specified by:
setAtUnpackedIndexin classAbstractPackedArrayContext
-
lazysetAtUnpackedIndex
void lazysetAtUnpackedIndex(int index, long newValue)- Specified by:
lazysetAtUnpackedIndexin classAbstractPackedArrayContext
-
incrementAndGetAtUnpackedIndex
long incrementAndGetAtUnpackedIndex(int index)
- Specified by:
incrementAndGetAtUnpackedIndexin classAbstractPackedArrayContext
-
addAndGetAtUnpackedIndex
long addAndGetAtUnpackedIndex(int index, long valueToAdd)- Specified by:
addAndGetAtUnpackedIndexin classAbstractPackedArrayContext
-
unpackedToString
java.lang.String unpackedToString()
- Specified by:
unpackedToStringin classAbstractPackedArrayContext
-
-