|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.util.AbstractKeyBasedMap
com.tangosol.net.cache.CacheStoreMap.ReadWriteMap
public static class CacheStoreMap.ReadWriteMap
A Map implementation that delegates straight through to a CacheStore.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.tangosol.util.AbstractKeyBasedMap |
---|
AbstractKeyBasedMap.EntrySet, AbstractKeyBasedMap.KeySet, AbstractKeyBasedMap.ValuesCollection |
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry |
Field Summary | |
---|---|
protected boolean |
m_fBlind
True means that put() and remove() can return null, regardless of the presence of an old value. |
protected boolean |
m_fEraseUnsupported
True means that a call to the CacheStore erase() method is assumed to be unsupported. |
protected boolean |
m_fStoreUnsupported
True means that a call to the CacheStore store() method is assumed to be unsupported. |
protected CacheStore |
m_store
The CacheStore to delegate all Map operations to. |
Constructor Summary | |
---|---|
CacheStoreMap.ReadWriteMap(CacheStore store,
boolean fBlind)
Construct a read/write CacheStoreMap. |
Method Summary | |
---|---|
void |
clear()
Clear is explicitly not implemented. |
boolean |
containsKey(Object oKey)
Returns true if this map contains a mapping for the specified key. |
Object |
get(Object oKey)
Returns the value to which this map maps the specified key. |
Map |
getAll(Collection colKeys)
Get all the specified keys, if they are in the Map. |
protected boolean |
isBlindPutAllowed()
Determine if the "blind put" optimization is possible. |
protected boolean |
isBlindRemoveAllowed()
Determine if the "blind remove" optimization is possible. |
protected boolean |
isEraseUnsupported()
Determine if the CacheStore has been determined to be read-only for erase() operations. |
protected boolean |
isStoreUnsupported()
Determine if the CacheStore has been determined to be read-only for store() operations. |
protected Iterator |
iterateKeys()
Create an iterator over the keys in this Map. |
Object |
put(Object oKey,
Object oValue)
Associates the specified value with the specified key in this map. |
void |
putAll(Map map)
Copies all of the mappings from the specified map to this map. |
Object |
remove(Object oKey)
Removes the mapping for this key from this map if present. |
protected boolean |
removeBlind(Object oKey)
Removes the mapping for this key from this map if present. |
Methods inherited from class com.tangosol.util.AbstractKeyBasedMap |
---|
clone, containsValue, entrySet, equals, hashCode, instantiateEntrySet, instantiateKeySet, instantiateValues, isEmpty, keySet, size, toString, values |
Field Detail |
---|
protected CacheStore m_store
protected boolean m_fBlind
protected boolean m_fStoreUnsupported
protected boolean m_fEraseUnsupported
Constructor Detail |
---|
public CacheStoreMap.ReadWriteMap(CacheStore store, boolean fBlind)
store
- the CacheStore to delegate read and write operations
tofBlind
- pass true to optimize put() and remove() by allowing
them to skip the loading of old valuesMethod Detail |
---|
public void clear()
clear
in interface Map
clear
in class AbstractKeyBasedMap
public boolean containsKey(Object oKey)
containsKey
in interface Map
containsKey
in class AbstractKeyBasedMap
public Object get(Object oKey)
get
in interface Map
get
in class AbstractKeyBasedMap
oKey
- the key object
public Map getAll(Collection colKeys)
getAll
in class AbstractKeyBasedMap
colKeys
- a collection of keys that may be in the named cache
protected Iterator iterateKeys()
iterateKeys
in class AbstractKeyBasedMap
public Object put(Object oKey, Object oValue)
put
in interface Map
put
in class AbstractKeyBasedMap
oKey
- key with which the specified value is to be associatedoValue
- value to be associated with the specified key
public void putAll(Map map)
AbstractKeyBasedMap.put(java.lang.Object, java.lang.Object)
on this map once for each mapping in the passed map. The behavior of
this operation is unspecified if the passed map is modified while the
operation is in progress.
putAll
in interface Map
putAll
in class AbstractKeyBasedMap
map
- the Map containing the key/value pairings to put into this
Mappublic Object remove(Object oKey)
remove
in interface Map
remove
in class AbstractKeyBasedMap
oKey
- key whose mapping is to be removed from the map
protected boolean removeBlind(Object oKey)
removeBlind
in class AbstractKeyBasedMap
oKey
- key whose mapping is to be removed from the map
protected boolean isBlindPutAllowed()
protected boolean isBlindRemoveAllowed()
protected boolean isStoreUnsupported()
protected boolean isEraseUnsupported()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |