Class EventMap

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<String,Object>
org.apache.druid.java.util.emitter.core.EventMap
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public class EventMap extends LinkedHashMap<String,Object>
EventMap is a linked hash map implementation where the insertion order of key-value pairs is maintained. It can be safely serialized to JSON using Jackson serializer as it respects the polymorphic annotations on entires (unlike standard Map). The example of polymorphic class is a query interface, where different native query types are resolved by additional field called "queryType". This implementation ensures that the annotation on the values are respected during serialization.
See Also:
  • Constructor Details

    • EventMap

      public EventMap()
  • Method Details

    • builder

      public static EventMap.Builder builder()
      Returns builder with Fluent API to build EventMap instance using method chaining
    • asBuilder

      public EventMap.Builder asBuilder()
      Convert this EventMap to a builder. Performs copy of the whole EventMap.