|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.util.Base
com.tangosol.net.cache.SimpleMemoryCalculator
com.tangosol.util.SimpleMapIndex.IndexCalculator
public static class SimpleMapIndex.IndexCalculator
A stateful calculator used to calculate the cost of a homogeneous index (holding all values of a single type).
| Nested Class Summary | |
|---|---|
static class |
SimpleMapIndex.IndexCalculator.CalculatorStateThe CalculatorState identifies the method used by the calculator to calculate the cost of a key or a value type. |
| Field Summary | |
|---|---|
protected static int |
DEFAULT_SIZEThe default size of an entry used if the calculator is unable to calculate the size. |
protected ConfigurableCacheMap.UnitCalculator |
m_calculatorThe ConfigurableCacheMap.UnitCalculator used to calculate the size of SimpleMapIndex.IndexCalculator.CalculatorState.CONFIGURED types. into Binary to approximate the size. |
protected int |
m_cbFixedIf the state is SimpleMapIndex.IndexCalculator.CalculatorState.FIXED, contains a cached cost per instance. |
protected Converter |
m_converterThe Converter used to convert SimpleMapIndex.IndexCalculator.CalculatorState.UNKNOWN types into Binary to approximate the size. |
protected SimpleMapIndex |
m_indexThe container index. |
protected SimpleMapIndex.IndexCalculator.CalculatorState |
m_stateThe SimpleMapIndex.IndexCalculator.CalculatorState of this calculator. |
| Fields inherited from class com.tangosol.net.cache.SimpleMemoryCalculator |
|---|
MAP_FIXED_SIZES, SIZE_BASIC_OBJECT, SIZE_BIGDECIMAL, SIZE_BIGINTEGER, SIZE_BINARY, SIZE_BOOLEAN, SIZE_BYTE, SIZE_CHARACTER, SIZE_DATE, SIZE_DOUBLE, SIZE_ENTRY, SIZE_FLOAT, SIZE_INTEGER, SIZE_LONG, SIZE_OBJECT, SIZE_OBJECT_REF, SIZE_SHORT, SIZE_STRING, SIZE_TIMESTAMP |
| Constructor Summary | |
|---|---|
SimpleMapIndex.IndexCalculator(BackingMapContext ctx, SimpleMapIndex index)Construct an IndexCalculator which allows for conversion of items into a serialized format. |
|
| Method Summary | |
|---|---|
protected SimpleMapIndex.IndexCalculator.CalculatorState |
getCalculatorState(java.lang.Class clz)Determine which method to use to count the size of an instance of the specified class. |
protected Converter |
getConverter()Return the converter used by this IndexCalculator, or null. |
protected SimpleMapIndex.IndexCalculator.CalculatorState |
initialize(java.lang.Object o)Initialize the calculator based on the type of the specified object assuming that the indexed values are homogeneous (of the same type). |
int |
sizeOf(java.lang.Object o)Estimate the number of bytes of memory consumed by the given object. |
| Methods inherited from class com.tangosol.net.cache.SimpleMemoryCalculator |
|---|
calculateShallowSize, calculateUnits, getName, main, padMemorySize, sizeOf |
| Field Detail |
|---|
protected SimpleMapIndex m_index
protected SimpleMapIndex.IndexCalculator.CalculatorState m_state
SimpleMapIndex.IndexCalculator.CalculatorState of this calculator.protected int m_cbFixed
SimpleMapIndex.IndexCalculator.CalculatorState.FIXED, contains a cached cost per instance.protected final Converter m_converter
Converter used to convert SimpleMapIndex.IndexCalculator.CalculatorState.UNKNOWN types into Binary to approximate the size.protected final ConfigurableCacheMap.UnitCalculator m_calculator
ConfigurableCacheMap.UnitCalculator used to calculate the size of SimpleMapIndex.IndexCalculator.CalculatorState.CONFIGURED types. into Binary to approximate the size. The calculator is initialized iff the BackingMapContext associated with the index represents a ConfigurableCacheMapprotected static final int DEFAULT_SIZE
| Constructor Detail |
|---|
public SimpleMapIndex.IndexCalculator(BackingMapContext ctx,
SimpleMapIndex index)
Note: ExternalizableHelper.CONVERTER_TO_BINARY can be used to convert Serializable or ExternalizableLite objects
ctx - the BackingMapContext associated with the indexed cacheindex - the container index for this calculator (used only for logging)| Method Detail |
|---|
protected SimpleMapIndex.IndexCalculator.CalculatorState getCalculatorState(java.lang.Class clz)
clz - the type of objects that this calculator will operate onSimpleMapIndex.IndexCalculator.CalculatorStateprotected SimpleMapIndex.IndexCalculator.CalculatorState initialize(java.lang.Object o)
o - an instance of the value to calculate the size forSimpleMapIndex.IndexCalculator.CalculatorStatepublic int sizeOf(java.lang.Object o)
The calculation is based on the class of the given object, with reference types assumed to be aligned on a 16-byte boundary:
sizeOf in class SimpleMemoryCalculatoro - the object to measure the size ofprotected Converter getConverter()
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||