Class PatternTreeMap<V,​VSerializer extends PathPatternNode.Serializer<V>>

    • Constructor Summary

      Constructors 
      Constructor Description
      PatternTreeMap​(java.util.function.Supplier<? extends java.util.Set<V>> supplier, java.util.function.BiConsumer<V,​java.util.Set<V>> appendFunction, java.util.function.BiConsumer<V,​java.util.Set<V>> deleteFunction, VSerializer serializer)
      Create PatternTreeMap.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void append​(PartialPath key, V value)
      Append key and value to PatternTreeMap.
      void delete​(PartialPath key, V value)
      Delete key and value to PatternTreeMap.
      java.util.List<V> getOverlapped​(PartialPath fullPath)
      Get value list related to PathPattern that overlapped with fullPath.
      java.util.List<java.util.List<V>> getOverlapped​(PartialPath devicePath, java.util.List<java.lang.String> measurements)
      Get a list of value lists related to PathPattern that overlapped with measurements under the same device.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PatternTreeMap

        public PatternTreeMap​(java.util.function.Supplier<? extends java.util.Set<V>> supplier,
                              java.util.function.BiConsumer<V,​java.util.Set<V>> appendFunction,
                              java.util.function.BiConsumer<V,​java.util.Set<V>> deleteFunction,
                              VSerializer serializer)
        Create PatternTreeMap.
        Parameters:
        supplier - provide type of set to store values on PathPatternNode
        appendFunction - define the merge logic of append value
        deleteFunction - define the split logic of delete value
    • Method Detail

      • append

        public void append​(PartialPath key,
                           V value)
        Append key and value to PatternTreeMap.
        Parameters:
        key - PartialPath that can contain '*' or '**'
        value - The value to be appended
      • delete

        public void delete​(PartialPath key,
                           V value)
        Delete key and value to PatternTreeMap.
        Parameters:
        key - PartialPath that can contain '*' or '**'
        value - The value to be deleted
      • getOverlapped

        public java.util.List<V> getOverlapped​(PartialPath fullPath)
        Get value list related to PathPattern that overlapped with fullPath.
        Parameters:
        fullPath - full path without wildcard
        Returns:
        de-duplicated value list
      • getOverlapped

        public java.util.List<java.util.List<V>> getOverlapped​(PartialPath devicePath,
                                                               java.util.List<java.lang.String> measurements)
        Get a list of value lists related to PathPattern that overlapped with measurements under the same device.
        Parameters:
        devicePath - device path without wildcard
        measurements - list of measurements
        Returns:
        de-duplicated value list