Top Description Inners Fields Constructors Methods
org.HdrHistogram.packedarray

pack-priv abstract Class AbstractPackedArrayContext

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
org.HdrHistogram.packedarray.PackedArrayContext
Imports
java.io.Serializable, java.util.Iterator, .NoSuchElementException

A packed-value, sparse array context used for storing 64 bit signed values. An array context is optimised for tracking sparsely set (as in mostly zeros) values that tend to not make use pof the full 64 bit value range even when they are non-zero. The array context's internal representation is such that the packed value at each virtual array index may be represented by 0-8 bytes of actual storage. An array context encodes the packed values in 8 "set trees" with each set tree representing one byte of the packed value at the virtual index in question. The getPackedIndex(int, int, boolean) method is used to look up the byte-index corresponding to the given (set tree) value byte of the given virtual index, and can be used to add entries to represent that byte as needed. As a succesful getPackedIndex(int, int, boolean) may require a resizing of the array, it can throw a ResizeException to indicate that the requested packed index cannot be found or added without a resize of the physical storage.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class
private static class

Field Summary

Modifier and TypeField and Description
private final boolean
private static final int
pack-priv static final int
pack-priv static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
PACKED_ARRAY_GROWTH_INCREMENT

The physical representation uses an insert-at-the-end mechanism for adding contents to the array.

private int
private static final int
private int
private int

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractPackedArrayContext(final int virtualLength, final int initialPhysicalLength)

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract long
addAndGetAtUnpackedIndex(int index, long valueToAdd)

pack-priv long

Returns:

the afterAddValue. ((afterAddValue & 0x100) != 0) indicates a carry.
addAtByteIndex
(final int
index of byte value to add to
byteIndex
,
final byte
byte value to add
valueToAdd
)

add a byte value to a current byte value in the array

pack-priv abstract boolean
casAtLongIndex(int longIndex, long expectedValue, long newValue)

pack-priv boolean
casAtShortIndex(final int shortIndex, final short expectedValue, final short newValue)

private boolean
casIndexAtEntrySlot(final int entryIndex, final int slot, final short expectedIndexValue, final short newIndexValue)

private boolean
casIndexAtEntrySlotIfNonZeroAndLessThan(final int entryIndex, final int slot, final short newIndexValue)

pack-priv abstract boolean
casPopulatedLongLength(int expectedPopulatedShortLength, int newPopulatedShortLength)

pack-priv abstract boolean
casPopulatedShortLength(int expectedPopulatedShortLength, int newPopulatedShortLength)

pack-priv abstract void
private void
consolidateEntry(final int
The shortIndex of the entry to be consolidated
entryIndex
)

Consolidate entry with previous entry verison if one exists

private long
contextLocalGetValueAtIndex(final int virtualIndex)

private void
copyEntriesAtLevelFromOther(final AbstractPackedArrayContext other, final int otherLevelEntryIndex, final int levelEntryIndexPointer, final int otherIndexShift)

pack-priv int
determineTopLevelShiftForVirtualLength(final int virtualLength)

private void
expandArrayIfNeeded(final int entryLengthInLongs)

private int

Returns:

the updated index of the entry (-1 if epansion failed due to conflict)
expandEntry
(final int
the index of the entry
existingEntryIndex
,
final int
index to the slot pointing to the entry (needs to be fixed up)
entryPointerIndex
,
final int
realtive [packed] index of slot being inserted into entry
insertedSlotIndex
,
final int
mask value fo slot being inserted
insertedSlotMask
,
final boolean
the level below this one is a leaf level
nextLevelIsLeaf
)

Expand entry as indicated.

private int
pack-priv byte
getAtByteIndex(final int byteIndex)

pack-priv abstract long
getAtLongIndex(int longIndex)

pack-priv short
getAtShortIndex(final int shortIndex)

pack-priv abstract long
getAtUnpackedIndex(int index)

private short
getIndexAtEntrySlot(final int entryIndex, final int slot)

pack-priv short
getIndexAtShortIndex(final int shortIndex)

pack-priv int

Returns:

the byte-index corresponding to the given (set tree) value byte of the given virtual index
getPackedIndex
(final int
The set tree number (0-7, 0 corresponding with the LSByte set tree)
setNumber
,
final int
The virtual index into the PackedArray
virtualIndex
,
final boolean
If true, will insert new set tree nodes as needed if they do not already exist
insertAsNeeded
)

Get the byte-index (into the packed array) corresponding to a given (set tree) value byte of given virtual index.

private int
getPackedSlotIndicators(final int entryIndex)

pack-priv int
pack-priv int
pack-priv int
pack-priv abstract int
private short
getPreviousVersionIndex(final int entryIndex)

private int
getRootEntry(final int setNumber)

private int
getRootEntry(final int setNumber, boolean insertAsNeeded)

pack-priv int
pack-priv int
pack-priv abstract long
pack-priv void
init(final int virtualLength)

pack-priv boolean
pack-priv abstract void
lazySetAtLongIndex(int longIndex, long newValue)

pack-priv abstract void
lazysetAtUnpackedIndex(int index, long newValue)

private String
leafEntryToString(final int entryIndex, final int indentLevel)

pack-priv abstract int
private int
newEntry(final int entryLengthInShorts)

private int
private String
nonLeafEntryToString(final int entryIndex, final int indexShift, final int indentLevel)

pack-priv Iterable<IterationValue>

Returns:

an Iterator over all non-Zero values in the array
nonZeroValues
()

An Iterator over all non-Zero values in the array

pack-priv void
private String
pack-priv abstract void
resizeArray(int newLength)

private int
seekToPopulatedVirtualIndexStartingAtLevel(final int startingVirtualIndex, final int levelEntryIndex, final int indexShift)

pack-priv void
setAtByteIndex(final int byteIndex, final byte value)

pack-priv void
setAtShortIndex(final int shortIndex, final short value)

pack-priv abstract void
setAtUnpackedIndex(int index, long newValue)

private void
setIndexAtEntrySlot(final int entryIndex, final int slot, final short newIndexValue)

private void
setPackedSlotIndicators(final int entryIndex, final short newPackedSlotIndicators)

private void
setPreviousVersionIndex(final int entryIndex, final short newPreviosVersionIndex)

private void
setTopLevelShift(final int topLevelShift)

pack-priv void
setValuePart(final int longIndex, final long valuePartAsLong, final long valuePartMask, final int valuePartShift)

pack-priv void
setVirtualLength(final int virtualLength)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
pack-priv abstract String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

isPackedback to summary
private final boolean isPacked
LEAF_LEVEL_SHIFTback to summary
private static final int LEAF_LEVEL_SHIFT
MAX_SUPPORTED_PACKED_COUNTS_ARRAY_LENGTHback to summary
pack-priv static final int MAX_SUPPORTED_PACKED_COUNTS_ARRAY_LENGTH
MINIMUM_INITIAL_PACKED_ARRAY_CAPACITYback to summary
pack-priv static final int MINIMUM_INITIAL_PACKED_ARRAY_CAPACITY
NON_LEAF_ENTRY_HEADER_SIZE_IN_SHORTSback to summary
private static final int NON_LEAF_ENTRY_HEADER_SIZE_IN_SHORTS
NON_LEAF_ENTRY_PREVIOUS_VERSION_OFFSETback to summary
private static final int NON_LEAF_ENTRY_PREVIOUS_VERSION_OFFSET
NON_LEAF_ENTRY_SLOT_INDICATORS_OFFSETback to summary
private static final int NON_LEAF_ENTRY_SLOT_INDICATORS_OFFSET
NUMBER_OF_SETSback to summary
private static final int NUMBER_OF_SETS
PACKED_ARRAY_GROWTH_FRACTION_POW2back to summary
private static final int PACKED_ARRAY_GROWTH_FRACTION_POW2
PACKED_ARRAY_GROWTH_INCREMENTback to summary
private static final int PACKED_ARRAY_GROWTH_INCREMENT

The physical representation uses an insert-at-the-end mechanism for adding contents to the array. Any insertion will occur at the very end of the array, and any expansion of an element will move it to the end, leaving an empty slot behind. Terminology: long-word: a 64-bit-aligned 64 bit word short-word: a 16-bit-aligned 16 bit word byte: an 8-bit-aligned byte long-index: an index of a 64-bit-aligned word within the overall array (i.e. in multiples of 8 bytes) short-index: an index of a 16-bit aligned short within the overall array (i.e. in multiples of 2 bytes) byte-index: an index of an 8-bit aligned byte within the overall array (i.e. in multiples of 1 byte) The storage array stores long (64 bit) words. Lookups for the variuous sizes are done as such: long getAtLongIndex(int longIndex) { return array[longIndex]; } short getAtShortIndex(int shortIndex) { return (short)((array[shortIndex >> 2] >> (shortIndex & 0x3)) & 0xffff); } byte getAtByteIndex(int byteIndex) { return (byte)((array[byteIndex >> 3] >> (byteIndex & 0x7)) & 0xff); } [Therefore there is no dependence on byte endiannes of the underlying arhcitecture] Structure: The packed array captures values at virtual indexes in a collection of striped "set trees" (also called "sets"), with each set tree representing one byte of the value at the virtual index in question. As such, there are 8 sets in the array, each corresponding to a byte in the overall value being stored. Set 0 contains the LSByte of the value, and Set 7 contains the MSByte of the value. The array contents is comprised of thre types of entries: - The root indexes: A fixed size 8 short-words array of short indexes at the start of the array, containing the short-index of the root entry of each of the 8 set trees. - Non-Leaf Entires: Variable sized, 2-18 short-words entries representing non-leaf entries in a set tree. Non-Leaf entries comprise of a 2 short-word header containing a packed slot indicators bitmask and the (optional non-zero) index of previous version of the entry, followed by an array of 0-16 shortwords. The short-word found at a given slot in this array holds an index to an entry in the next level of the set tree. - Leaf Entries: comprised of long-words. Each byte [0-7] in the longword holds an actual value. Specifically, the byte-index of that LeafEntry byte in the array is the byte-index for the given set's byte value of a virtual index. If a given virtual index for a given set has no entry in a given set tree, the byte value for that set of that virtual index interpreted as 0. If a given set tree does not have an entry for a given virtual index, it is safe to assume that no higher significance set tree have one either. Non-leaf entries structure and mutation protocols: The structure of a Non-Leaf entry in the array can be roughly desctibed in terms of this C-stylre struct: struct nonLeafEntry { short packedSlotIndicators; short previousVersionIndex; short[] enrtrySlotsIndexes; } Non-leaf entries are 2-18 short-words in length, with the length determined by the number of bits set in the packedSlotIndicators short-word in the entry. The packed slot indicators short-word is a bit mask which represents the 16 possible next-level entries below the given entry, and has a bit set (to '1') for each slot that is actually populated with a next level entry. Each of the short-words in the enrtrySlots is associated with a specific active ('1') bit in the packedSlotIndicators short-word, and holds the index to the next level's entry associated with ta given path in the tree. [Note: the values in enrtrySlotsIndexes[] are short-indexes if the next level is not a leaf level, and long-indexes if the next level is a leaf.] Summary of Non-leaf entry use and replacement protocol: - No value in any enrtrySlotsIndexes[] array is ever initialized to a zero value. Zero values in enrtrySlotsIndexes[] can only appear through consolidation (see below). Once an enrtrySlotsIndexes[] slot is observed to contain a zero, it cannot change to a non-zero value. - Zero values encountered in enrtrySlotsIndexes[] arrays are never followed. If a zero value is found when looking for the index to a lower level entry during a tree walk, the tree walking operation is restarted from the root. - A Non-Leaf entry with an active (non zero index) previous version is never followed or expanded. Instead, any thread encountering a Non-leaf entry with an active previous version will consolidate the previous version with the current one. the consolidation opeartion will clear (zero) the previousVersionIndex, which will then allow the caller to continue with whatever use the thread was attempting to make of the entry. - Expansion of entries: Since entries hold only enough storage to represent currently populated paths below them in the set tree, any addition of entries at a lower level requires the expansion of the entry to make room for a larger enrtrySlotsIndexes array. Expansion allocates a new and larger entry structure, and populates the newly inserted slot in it with an index to a newly allocated next-level entry. It then links the newly expanded entry the previous entry structure via the previousVersionIndex field, and publishes the newly expanded entry by [atomically] replacing the "pointer index" to the previous entry (located at a higher level entry's slot, or in the root indexes) with a "pointer index" to the newly expanded entry structure. A failure to atomically publish a newly expanded entry (e.g. if the "pointer index" being replaced holds a value other than that in our not-yet-published previousVersionIndex) will restart the expansion operation from the beginning. When first published, a newly-visible expanded entry is immediately "usable" because it has an active, "not yet consolidated" previous version entry, and any user of the entry will first have to consolidate it. The expansion will follow publication of the expanded entry with a consolidation of the previous entry into the new one, clearing the previousVersionIndex field in the process, and enabling normal use of the expanded entry. - Concurrent consolidation: While expansion and consolidation are ongoing, other threads can be concurrently walking the set trees. Per the protocol stated here, any tree walk encountering a Non-Leaf entry with an active previous version will consolidate the entry before using it. Consolidation can of a given entry can occur concurrently by an an expanding thread and by multiple walking threads. - Consolidation of a a previous version entry into a current one is done by: - For each non-zero index in the previous version enrty, copy that index to the new assocaited entry slot in the entry, and CAS a zero in the old entry slot. If the CAS fails, repeat (including the zero check). - Once all entry slots in the previous version entry have been consolidated and zeroed, zero the index to the previous version entry.

physicalLengthback to summary
private int physicalLength
SET_0_START_INDEXback to summary
private static final int SET_0_START_INDEX
topLevelShiftback to summary
private int topLevelShift
virtualLengthback to summary
private int virtualLength

Constructor Detail

AbstractPackedArrayContextback to summary
pack-priv AbstractPackedArrayContext(final int virtualLength, final int initialPhysicalLength)

Method Detail

addAndGetAtUnpackedIndexback to summary
pack-priv abstract long addAndGetAtUnpackedIndex(int index, long valueToAdd)
addAtByteIndexback to summary
pack-priv long addAtByteIndex(final int byteIndex, final byte valueToAdd)

add a byte value to a current byte value in the array

Parameters
byteIndex:int

index of byte value to add to

valueToAdd:byte

byte value to add

Returns:long

the afterAddValue. ((afterAddValue & 0x100) != 0) indicates a carry.

casAtLongIndexback to summary
pack-priv abstract boolean casAtLongIndex(int longIndex, long expectedValue, long newValue)
casAtShortIndexback to summary
pack-priv boolean casAtShortIndex(final int shortIndex, final short expectedValue, final short newValue)
casIndexAtEntrySlotback to summary
private boolean casIndexAtEntrySlot(final int entryIndex, final int slot, final short expectedIndexValue, final short newIndexValue)
casIndexAtEntrySlotIfNonZeroAndLessThanback to summary
private boolean casIndexAtEntrySlotIfNonZeroAndLessThan(final int entryIndex, final int slot, final short newIndexValue)
casPopulatedLongLengthback to summary
pack-priv abstract boolean casPopulatedLongLength(int expectedPopulatedShortLength, int newPopulatedShortLength)
casPopulatedShortLengthback to summary
pack-priv abstract boolean casPopulatedShortLength(int expectedPopulatedShortLength, int newPopulatedShortLength)
clearContentsback to summary
pack-priv abstract void clearContents()
consolidateEntryback to summary
private void consolidateEntry(final int entryIndex)

Consolidate entry with previous entry verison if one exists

Parameters
entryIndex:int

The shortIndex of the entry to be consolidated

contextLocalGetValueAtIndexback to summary
private long contextLocalGetValueAtIndex(final int virtualIndex)
copyEntriesAtLevelFromOtherback to summary
private void copyEntriesAtLevelFromOther(final AbstractPackedArrayContext other, final int otherLevelEntryIndex, final int levelEntryIndexPointer, final int otherIndexShift)
determineTopLevelShiftForVirtualLengthback to summary
pack-priv int determineTopLevelShiftForVirtualLength(final int virtualLength)
expandArrayIfNeededback to summary
private void expandArrayIfNeeded(final int entryLengthInLongs) throws ResizeException
expandEntryback to summary
private int expandEntry(final int existingEntryIndex, final int entryPointerIndex, final int insertedSlotIndex, final int insertedSlotMask, final boolean nextLevelIsLeaf) throws RetryException, ResizeException

Expand entry as indicated.

Parameters
existingEntryIndex:int

the index of the entry

entryPointerIndex:int

index to the slot pointing to the entry (needs to be fixed up)

insertedSlotIndex:int

realtive [packed] index of slot being inserted into entry

insertedSlotMask:int

mask value fo slot being inserted

nextLevelIsLeaf:boolean

the level below this one is a leaf level

Returns:int

the updated index of the entry (-1 if epansion failed due to conflict)

Exceptions
RetryException:
if expansion fails due to concurrent conflict, and caller should try again.
findFirstPotentiallyPopulatedVirtualIndexStartingAtback to summary
private int findFirstPotentiallyPopulatedVirtualIndexStartingAt(final int startingVirtualIndex)
getAtByteIndexback to summary
pack-priv byte getAtByteIndex(final int byteIndex)
getAtLongIndexback to summary
pack-priv abstract long getAtLongIndex(int longIndex)
getAtShortIndexback to summary
pack-priv short getAtShortIndex(final int shortIndex)
getAtUnpackedIndexback to summary
pack-priv abstract long getAtUnpackedIndex(int index)
getIndexAtEntrySlotback to summary
private short getIndexAtEntrySlot(final int entryIndex, final int slot)
getIndexAtShortIndexback to summary
pack-priv short getIndexAtShortIndex(final int shortIndex)
getPackedIndexback to summary
pack-priv int getPackedIndex(final int setNumber, final int virtualIndex, final boolean insertAsNeeded) throws ResizeException

Get the byte-index (into the packed array) corresponding to a given (set tree) value byte of given virtual index. Inserts new set tree nodes as needed if indicated.

Parameters
setNumber:int

The set tree number (0-7, 0 corresponding with the LSByte set tree)

virtualIndex:int

The virtual index into the PackedArray

insertAsNeeded:boolean

If true, will insert new set tree nodes as needed if they do not already exist

Returns:int

the byte-index corresponding to the given (set tree) value byte of the given virtual index

getPackedSlotIndicatorsback to summary
private int getPackedSlotIndicators(final int entryIndex)
getPhysicalLengthback to summary
pack-priv int getPhysicalLength()
getPopulatedByteLengthback to summary
pack-priv int getPopulatedByteLength()
getPopulatedLongLengthback to summary
pack-priv int getPopulatedLongLength()
getPopulatedShortLengthback to summary
pack-priv abstract int getPopulatedShortLength()
getPreviousVersionIndexback to summary
private short getPreviousVersionIndex(final int entryIndex)
getRootEntryback to summary
private int getRootEntry(final int setNumber)
getRootEntryback to summary
private int getRootEntry(final int setNumber, boolean insertAsNeeded) throws RetryException, ResizeException
getTopLevelShiftback to summary
pack-priv int getTopLevelShift()
getVirtualLengthback to summary
pack-priv int getVirtualLength()
incrementAndGetAtUnpackedIndexback to summary
pack-priv abstract long incrementAndGetAtUnpackedIndex(int index)
initback to summary
pack-priv void init(final int virtualLength)
isPackedback to summary
pack-priv boolean isPacked()
lazySetAtLongIndexback to summary
pack-priv abstract void lazySetAtLongIndex(int longIndex, long newValue)
lazysetAtUnpackedIndexback to summary
pack-priv abstract void lazysetAtUnpackedIndex(int index, long newValue)
leafEntryToStringback to summary
private String leafEntryToString(final int entryIndex, final int indentLevel)
lengthback to summary
pack-priv abstract int length()
newEntryback to summary
private int newEntry(final int entryLengthInShorts) throws ResizeException
newLeafEntryback to summary
private int newLeafEntry() throws ResizeException
nonLeafEntryToStringback to summary
private String nonLeafEntryToString(final int entryIndex, final int indexShift, final int indentLevel)
nonZeroValuesback to summary
pack-priv Iterable<IterationValue> nonZeroValues()

An Iterator over all non-Zero values in the array

Returns:Iterable<IterationValue>

an Iterator over all non-Zero values in the array

populateEquivalentEntriesWithZerosFromOtherback to summary
pack-priv void populateEquivalentEntriesWithZerosFromOther(final AbstractPackedArrayContext other)
recordedValuesToStringback to summary
private String recordedValuesToString()
resizeArrayback to summary
pack-priv abstract void resizeArray(int newLength)
seekToPopulatedVirtualIndexStartingAtLevelback to summary
private int seekToPopulatedVirtualIndexStartingAtLevel(final int startingVirtualIndex, final int levelEntryIndex, final int indexShift) throws RetryException
setAtByteIndexback to summary
pack-priv void setAtByteIndex(final int byteIndex, final byte value)
setAtShortIndexback to summary
pack-priv void setAtShortIndex(final int shortIndex, final short value)
setAtUnpackedIndexback to summary
pack-priv abstract void setAtUnpackedIndex(int index, long newValue)
setIndexAtEntrySlotback to summary
private void setIndexAtEntrySlot(final int entryIndex, final int slot, final short newIndexValue)
setPackedSlotIndicatorsback to summary
private void setPackedSlotIndicators(final int entryIndex, final short newPackedSlotIndicators)
setPreviousVersionIndexback to summary
private void setPreviousVersionIndex(final int entryIndex, final short newPreviosVersionIndex)
setTopLevelShiftback to summary
private void setTopLevelShift(final int topLevelShift)
setValuePartback to summary
pack-priv void setValuePart(final int longIndex, final long valuePartAsLong, final long valuePartMask, final int valuePartShift)
setVirtualLengthback to summary
pack-priv void setVirtualLength(final int virtualLength)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
unpackedToStringback to summary
pack-priv abstract String unpackedToString()
org.HdrHistogram.packedarray back to summary

pack-priv Class AbstractPackedArrayContext.NonZeroValues

extends Object
implements Iterable<IterationValue>
Class Inheritance
  • java.lang.Object
  • org.HdrHistogram.packedarray.AbstractPackedArrayContext.NonZeroValues
All Implemented Interfaces
java.lang.Iterable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Iterator<IterationValue>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NonZeroValuesback to summary
pack-priv NonZeroValues()

Method Detail

iteratorback to summary
public Iterator<IterationValue> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<IterationValue>

an Iterator.

org.HdrHistogram.packedarray back to summary

pack-priv Class AbstractPackedArrayContext.NonZeroValuesIterator

extends Object
implements Iterator<IterationValue>
Class Inheritance
  • java.lang.Object
  • org.HdrHistogram.packedarray.AbstractPackedArrayContext.NonZeroValuesIterator
All Implemented Interfaces
java.util.Iterator

Field Summary

Modifier and TypeField and Description
pack-priv final IterationValue
pack-priv long
pack-priv int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
findFirstNonZeroValueVirtualIndexStartingAt(final int startingVirtualIndex)

public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.
public IterationValue
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.
public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currentIterationValueback to summary
pack-priv final IterationValue currentIterationValue
nextValueback to summary
pack-priv long nextValue
nextVirtrualIndexback to summary
pack-priv int nextVirtrualIndex

Constructor Detail

NonZeroValuesIteratorback to summary
pack-priv NonZeroValuesIterator()

Method Detail

findFirstNonZeroValueVirtualIndexStartingAtback to summary
private void findFirstNonZeroValueVirtualIndexStartingAt(final int startingVirtualIndex)
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
nextback to summary
public IterationValue next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:IterationValue

the next element in the iteration

Annotations
@Override
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override
org.HdrHistogram.packedarray back to summary

private Class AbstractPackedArrayContext.RetryException

extends Exception
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Constructor Detail

RetryExceptionback to summary
private RetryException()