|
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.SafeSortedMap.Split
public class SafeSortedMap.Split
Split encapsulates the headMap and tailMap of the SafeSortedMap at a given split-key and could be used as an optimization facility when both head and tail portions of the SortedMap are needed.
Field Summary | |
---|---|
protected float |
m_flHeadWeight The estimated weight of the head portion of the split, expressed as a ratio of the size of the headMap to the size of the underlying SafeSortedMap. |
protected java.util.SortedMap |
m_mapHead The headMap. |
protected java.util.SortedMap |
m_mapTail The tailMap. |
Constructor Summary | |
---|---|
protected |
SafeSortedMap.Split(java.lang.Object oKey) Construct a split at the specified key. |
Method Summary | |
---|---|
protected float |
calculateHeadWeight() Estimate the weight of the head portion of the Split. |
java.util.SortedMap |
getHead() Return front of the split. |
float |
getHeadWeight() Return the estimated weight of the head portion of the SafeSortedMap.Split . |
java.lang.Object |
getSplitKey() Return the key around which this is SafeSortedMap.Split is defined. |
java.util.SortedMap |
getTail() Return tail of the split |
float |
getTailWeight() Return the estimated weight of the tail portion of the SafeSortedMap.Split . |
boolean |
isHeadHeavy() Return true if the estimated weight of the head of the split is larger than the tail. |
protected int |
quickLog(int n, int nBase) Calculate and return the floor of lognBase(n). |
Field Detail |
---|
protected java.util.SortedMap m_mapHead
protected java.util.SortedMap m_mapTail
protected float m_flHeadWeight
Constructor Detail |
---|
protected SafeSortedMap.Split(java.lang.Object oKey)
oKey
- the key at which to splitMethod Detail |
---|
protected int quickLog(int n, int nBase)
n
- the number to take the logarithm ofnBase
- the base with which to compute the logarithmprotected float calculateHeadWeight()
public java.util.SortedMap getHead()
public java.util.SortedMap getTail()
public float getHeadWeight()
SafeSortedMap.Split
. The weight is expressed as a ratio of the size of the headMap to the size of the underlying SafeSortedMap.
Note: this method is not guaranteed to return an exact answer, but rather uses a heuristic to make an estimate. For an exact answer, the more expensive size() methods should be used.
public float getTailWeight()
SafeSortedMap.Split
. The weight is expressed as a ratio of the size of the tailMap to the size of the underlying SafeSortedMap.
Note: this method is not guaranteed to return an exact answer, but rather uses a heuristic to make an estimate. For an exact answer, the more expensive size() methods should be used.
public boolean isHeadHeavy()
getHeadWeight()
public java.lang.Object getSplitKey()
SafeSortedMap.Split
is defined.SafeSortedMap.Split
is defined
|
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 |