Package org.eclipse.mat.inspections
Class CommonNameResolver.DoubleAdderResolver
java.lang.Object
org.eclipse.mat.inspections.CommonNameResolver.DoubleAdderResolver
- All Implemented Interfaces:
IClassSpecificNameResolver
- Enclosing class:
CommonNameResolver
public static class CommonNameResolver.DoubleAdderResolver
extends Object
implements IClassSpecificNameResolver
Resolves the current sum of a
DoubleAdder from its internal
Striped64 representation.
Striped64 stores double values as raw IEEE 754 bit patterns
in long fields (base and each Cell.value) so
that the JVM's integer-width compare-and-swap instruction can be used —
there is no native atomic CAS on double. Each field must
therefore be decoded with Double.longBitsToDouble(long) before
accumulation; summing the raw long representations directly would
produce nonsense. The initial value of base in a freshly
constructed DoubleAdder is 0L, which correctly decodes
to 0.0.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DoubleAdderResolver
public DoubleAdderResolver()
-
-
Method Details
-
resolve
Description copied from interface:IClassSpecificNameResolverResolve the name for snapshot object.- Specified by:
resolvein interfaceIClassSpecificNameResolver- Parameters:
obj- object for which the name should be resolved- Returns:
- name for snapshot object
- Throws:
SnapshotException- problem retrieving the name
-