|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
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.util.AbstractKeyBasedMap
com.tangosol.net.cache.SimpleSerializationMap
public class SimpleSerializationMap
Map implementation that stores and accesses its contents through an underlying BinaryStore. The Map does not maintain additional state, such as the keys that it contains, which allows it to manage very large sets of data. However, a number of operations that would normally be "free" are potentially very expensive with this implementation. For example, size()
has to iterate through all the keys provided by the underlying BinaryStore, and containsKey(java.lang.Object)
has to read the value from the underlying BinaryStore to prove its existence.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.tangosol.util.AbstractKeyBasedMap |
---|
AbstractKeyBasedMap.DeferredCacheEvent, AbstractKeyBasedMap.EntrySet, AbstractKeyBasedMap.KeySet, AbstractKeyBasedMap.ValuesCollection |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry |
Constructor Summary | |
---|---|
SimpleSerializationMap(BinaryStore store) Construct a SimpleSerializationMap on top of a BinaryStore. |
|
SimpleSerializationMap(BinaryStore store, boolean fBinaryMap) Construct a SimpleSerializationMap on top of a BinaryStore, optionally storing only Binary keys and values. |
|
SimpleSerializationMap(BinaryStore store, java.lang.ClassLoader loader) Construct a SimpleSerializationMap on top of a BinaryStore, using the passed ClassLoader for deserialization. |
Method Summary | |
---|---|
void |
clear() Clear all key/value mappings. |
boolean |
containsKey(java.lang.Object oKey) Returns true if this map contains a mapping for the specified key. |
boolean |
containsValue(java.lang.Object oValue) Returns true if this Map maps one or more keys to the specified value. |
protected java.lang.Object |
fromBinary(Binary bin) Translate the passed Binary object into an Object object. |
java.lang.Object |
get(java.lang.Object oKey) Returns the value to which this map maps the specified key. |
BinaryStore |
getBinaryStore() Returns the BinaryStore that this map uses for its storage. |
CacheStatistics |
getCacheStatistics() Returns the CacheStatistics for this cache. |
java.lang.ClassLoader |
getClassLoader() Returns the ClassLoader that this map uses for deserialization, if it has one. |
boolean |
isBinaryMap() Determine if the keys and values in this map are known to be all Binary. |
boolean |
isEmpty() Returns true if this map contains no key-value mappings. |
protected java.util.Iterator |
iterateKeys() Create an iterator over the keys in this Map. |
java.lang.Object |
put(java.lang.Object oKey, java.lang.Object oValue) Associates the specified value with the specified key in this map. |
void |
putAll(java.util.Map map) Copies all of the mappings from the specified map to this map. |
java.lang.Object |
remove(java.lang.Object oKey) Removes the mapping for this key from this map if present. |
protected boolean |
removeBlind(java.lang.Object oKey) Removes the mapping for this key from this map if present. |
protected void |
setBinaryMap(boolean fBinary) Configure the Map to be aware that all the keys and values in the map are known to be Binary or not. |
protected void |
setBinaryStore(BinaryStore store) Configures the BinaryStore that this map will use for its storage. |
protected void |
setClassLoader(java.lang.ClassLoader loader) Configure the ClassLoader that this map will use for deserialization. |
int |
size() Returns the number of key-value mappings in this map. |
protected Binary |
toBinary(java.lang.Object o) Translate the passed Object object into an Binary object. |
java.lang.String |
toString() Returns a string representation of this Map. |
Methods inherited from class com.tangosol.util.AbstractKeyBasedMap |
---|
clone, entrySet, equals, getAll, hashCode, instantiateEntrySet, instantiateKeySet, instantiateValues, keySet, values |
Constructor Detail |
---|
public SimpleSerializationMap(BinaryStore store)
store
- the BinaryStore to use to write the serialized objects topublic SimpleSerializationMap(BinaryStore store, java.lang.ClassLoader loader)
store
- the BinaryStore to use to write the serialized objects toloader
- the ClassLoader to use for deserializationpublic SimpleSerializationMap(BinaryStore store, boolean fBinaryMap)
store
- the BinaryStore to use to write the serialized objects tofBinaryMap
- true indicates that this map will only manage binary keys and valuesMethod Detail |
---|
public void clear()
clear
in interface java.util.Map
clear
in class AbstractKeyBasedMap
public boolean containsKey(java.lang.Object oKey)
containsKey
in interface java.util.Map
containsKey
in class AbstractKeyBasedMap
public boolean containsValue(java.lang.Object oValue)
containsValue
in interface java.util.Map
containsValue
in class AbstractKeyBasedMap
public java.lang.Object get(java.lang.Object oKey)
get
in interface java.util.Map
get
in class AbstractKeyBasedMap
oKey
- the key objectpublic boolean isEmpty()
isEmpty
in interface java.util.Map
isEmpty
in class AbstractKeyBasedMap
public java.lang.Object put(java.lang.Object oKey, java.lang.Object oValue)
put
in interface java.util.Map
put
in class AbstractKeyBasedMap
oKey
- key with which the specified value is to be associatedoValue
- value to be associated with the specified keypublic void putAll(java.util.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 java.util.Map
putAll
in class AbstractKeyBasedMap
map
- the Map containing the key/value pairings to put into this Mappublic java.lang.Object remove(java.lang.Object oKey)
remove
in interface java.util.Map
remove
in class AbstractKeyBasedMap
oKey
- key whose mapping is to be removed from the mappublic int size()
size
in interface java.util.Map
size
in class AbstractKeyBasedMap
protected java.util.Iterator iterateKeys()
iterateKeys
in class AbstractKeyBasedMap
protected boolean removeBlind(java.lang.Object oKey)
removeBlind
in class AbstractKeyBasedMap
oKey
- key whose mapping is to be removed from the mappublic java.lang.String toString()
toString
in class AbstractKeyBasedMap
public BinaryStore getBinaryStore()
Note: This implementation assumes that the BinaryStore is only being modified by this Map instance. If you modify the BinaryStore contents, the behavior of this Map is undefined.
protected void setBinaryStore(BinaryStore store)
store
- the BinaryStore to usepublic java.lang.ClassLoader getClassLoader()
protected void setClassLoader(java.lang.ClassLoader loader)
loader
- the ClassLoader that this map should use for deserializationpublic boolean isBinaryMap()
protected void setBinaryMap(boolean fBinary)
fBinary
- pass true if all keys and values will be Binarypublic CacheStatistics getCacheStatistics()
protected Binary toBinary(java.lang.Object o)
o
- the Object to serialize into a Binary objectprotected java.lang.Object fromBinary(Binary bin)
bin
- the Binary object to deserialize
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |