|
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.MultiBinaryLongMap.MaskedLongMapHolder
protected static class MultiBinaryLongMap.MaskedLongMapHolder
MaskedLongMapHolder is used to produce MultiBinaryLongMap.MaskedBinaryLongMap
instances backed by a shared BinaryLongMap. MaskedBinaryLongMap instances created by this holder are thread-safe and are all protected by the same shared and exclusive locks.
Field Summary | |
---|---|
protected BinaryLongMap |
f_blm The BinaryLongMap shared by the component masked BLMs. |
protected long |
f_lMaskReserved The bit-mask describing which bits in the underlying BLM representation are reserved (and may not be allocated by this holder). |
protected java.util.concurrent.locks.Lock |
f_lockS The shared lock used to protected the logical contents of the maps exposed by this MaskedLongMapHolder. |
protected java.util.concurrent.locks.Lock |
f_lockX The exclusive lock used to protected the logical contents of the maps exposed by this MaskedLongMapHolder. |
protected java.util.List |
m_listBLMs The list of reserved masked BLMs, ordered by increasing shift-position. |
protected long |
m_lMaskFree The bit-mask describing which bits in the underlying BLM representation are free. |
Constructor Summary | |
---|---|
MultiBinaryLongMap.MaskedLongMapHolder(BinaryLongMap blm, java.util.concurrent.locks.Lock lockSMaster) Construct a MaskedLongMapHolder backed by the specified blm. |
|
MultiBinaryLongMap.MaskedLongMapHolder(BinaryLongMap blm, java.util.concurrent.locks.Lock lockSMaster, long lMaskReserved) Construct a MaskedLongMapHolder backed by the specified blm with the specified reserved bit-mask. |
Method Summary | |
---|---|
protected void |
checkRep() Debugging function to check the representational invariant. |
BinaryLongMap |
getDelegateMap() Return the BinaryLongMap that provides the underlying storage for this MaskedLongMapHolder. |
protected MultiBinaryLongMap.MaskedBinaryLongMap |
instantiateMaskedBinaryLongMap(int cShift, int cBits) Factory method for instantiating MaskedBinaryLongMap instances associated with this MaskedLongMapHolder. |
boolean |
isEmpty() Return true iff all non-reserved bits are free (not in-use). |
boolean |
releaseMap(MultiBinaryLongMap.MaskedBinaryLongMap blm) Release a masked BLM that was reserved from this MaskedLongMapHolder. |
BinaryLongMap |
reserveMap(int cBits) Reserve and return a masked BLM from this MaskedLongMapHolder if available, or null otherwise. |
protected void |
shiftMaskedMap(MultiBinaryLongMap.MaskedBinaryLongMap blm, int cShiftRight) Shift the representation of the specified MaskedBinaryLongMap by the specified number of bits to the right. |
Field Detail |
---|
protected java.util.List m_listBLMs
reserved
masked BLMs, ordered by increasing shift-position.protected final long f_lMaskReserved
protected long m_lMaskFree
protected final java.util.concurrent.locks.Lock f_lockS
protected final java.util.concurrent.locks.Lock f_lockX
protected final BinaryLongMap f_blm
Constructor Detail |
---|
public MultiBinaryLongMap.MaskedLongMapHolder(BinaryLongMap blm, java.util.concurrent.locks.Lock lockSMaster)
blm
- the BinaryLongMap that the component masked maps are backed bylockSMaster
- the shared master-lock for the MultiBinaryLongMappublic MultiBinaryLongMap.MaskedLongMapHolder(BinaryLongMap blm, java.util.concurrent.locks.Lock lockSMaster, long lMaskReserved)
blm
- the BinaryLongMap that the component masked maps are backed bylockSMaster
- the shared master-lock for the MultiBinaryLongMaplMaskReserved
- the bit-mask representing the reserved bitsMethod Detail |
---|
public BinaryLongMap getDelegateMap()
public BinaryLongMap reserveMap(int cBits)
released
when no longer needed.cBits
- the number of bits to use to store each valuepublic boolean releaseMap(MultiBinaryLongMap.MaskedBinaryLongMap blm)
reserved
from this MaskedLongMapHolder.blm
- the masked BLM to releasepublic boolean isEmpty()
protected MultiBinaryLongMap.MaskedBinaryLongMap instantiateMaskedBinaryLongMap(int cShift, int cBits)
cShift
- the shift position of the masked BLMcBits
- the bit-width of values represented by the BLMprotected void shiftMaskedMap(MultiBinaryLongMap.MaskedBinaryLongMap blm, int cShiftRight)
Note: the caller must hold exclusive access to the underlying BLM (and by extension, exclusive access to all derived masked maps).
blm
- the MaskedBinaryLongMap to shiftcShiftRight
- the number of bits to shift to the rightprotected void checkRep()
|
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 |