Package com.tangosol.coherence.rest.util
Class JsonMap
java.lang.Object
java.util.AbstractMap<String,Object>
- All Implemented Interfaces:
ExternalizableLite
,Versionable<Integer>
,Externalizable
,Serializable
,Cloneable
,Map<String,
Object>
A simple wrapper around
LiteMap
that preserves the order of elements
and adds support for POF serialization without fidelity loss in order to
support JSON pass-through.- Author:
- as 2015.08.25
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.coherence.common.collections.InflatableMap
com.oracle.coherence.common.collections.InflatableMap.EntryIterator<K,
V>, com.oracle.coherence.common.collections.InflatableMap.EntrySet Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields inherited from class com.oracle.coherence.common.collections.InflatableMap
I_OTHER, m_nImpl, m_oContents, THRESHOLD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the version indicator for this object.void
Update the version to the next logical version indicator.(Factory pattern) Instantiate a Map object to store entries in once the "lite" threshold has been exceeded.Associates the specified value with the specified key in this map.Methods inherited from class com.tangosol.util.LiteMap
readExternal, writeExternal
Methods inherited from class com.oracle.coherence.common.collections.InflatableMap
checkShrinkFromOther, clear, clone, containsKey, ensureRuntimeException, entrySet, get, instantiateEntry, instantiateEntrySet, isEmpty, readExternal, remove, size, writeExternal
Methods inherited from class java.util.AbstractMap
containsValue, equals, hashCode, keySet, putAll, toString, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
Methods inherited from interface com.tangosol.util.Versionable
isVersioningEnabled
-
Constructor Details
-
JsonMap
public JsonMap()Construct a JsonMap. -
JsonMap
Construct a JsonMap with the same mappings as the given map.- Parameters:
map
- the map whose mappings are to be placed in this map.
-
-
Method Details
-
instantiateMap
Description copied from class:com.oracle.coherence.common.collections.InflatableMap
(Factory pattern) Instantiate a Map object to store entries in once the "lite" threshold has been exceeded. This method permits inheriting classes to easily override the choice of the Map object. -
put
Description copied from class:com.oracle.coherence.common.collections.InflatableMap
Associates the specified value with the specified key in this map.- Specified by:
put
in interfaceMap<String,
Object> - Overrides:
put
in classcom.oracle.coherence.common.collections.InflatableMap<String,
Object> - Parameters:
key
- key with which the specified value is to be associatedvalue
- value to be associated with the specified key- Returns:
- previous value associated with specified key, or null if there was no mapping for key
-
getVersionIndicator
Description copied from interface:Versionable
Get the version indicator for this object. The version indicator should be an immutable object or one treated as an immutable, which is to say that after the version is incremented, the previous version's indicator reference will never be returned again.- Specified by:
getVersionIndicator
in interfaceVersionable<Integer>
- Returns:
- a non-null version value that implements the Comparable interface
-
incrementVersion
public void incrementVersion()Description copied from interface:Versionable
Update the version to the next logical version indicator.- Specified by:
incrementVersion
in interfaceVersionable<Integer>
-