Class JsonMap

java.lang.Object
java.util.AbstractMap<String,Object>
com.oracle.coherence.common.collections.InflatableMap<String,Object>
com.tangosol.util.LiteMap<String,Object>
com.tangosol.coherence.rest.util.JsonMap
All Implemented Interfaces:
ExternalizableLite, Versionable<Integer>, Externalizable, Serializable, Cloneable, Map<String,Object>

public class JsonMap extends LiteMap<String,Object> implements Versionable<Integer>
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:
  • Constructor Details

    • JsonMap

      public JsonMap()
      Construct a JsonMap.
    • JsonMap

      public JsonMap(Map<String,?> map)
      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

      protected Map<String,Object> 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.
      Overrides:
      instantiateMap in class com.oracle.coherence.common.collections.InflatableMap<String,Object>
      Returns:
      an instance of Map
    • put

      public Object put(String key, Object value)
      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 interface Map<String,Object>
      Overrides:
      put in class com.oracle.coherence.common.collections.InflatableMap<String,Object>
      Parameters:
      key - key with which the specified value is to be associated
      value - 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

      public Integer 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 interface Versionable<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 interface Versionable<Integer>