Class PathTrie<T>


  • public class PathTrie<T>
    extends java.lang.Object
    • Method Summary

      Modifier and Type Method Description
      void insert​(java.lang.String path, T value)  
      void insertOrUpdate​(java.lang.String path, T value, java.util.function.BiFunction<T,​T,​T> updater)
      Insert a value for the given path.
      T retrieve​(java.lang.String path)  
      T retrieve​(java.lang.String path, java.util.Map<java.lang.String,​java.lang.String> params)  
      T retrieve​(java.lang.String path, java.util.Map<java.lang.String,​java.lang.String> params, org.elasticsearch.common.path.PathTrie.TrieMatchingMode trieMatchingMode)  
      java.util.Iterator<T> retrieveAll​(java.lang.String path, java.util.function.Supplier<java.util.Map<java.lang.String,​java.lang.String>> paramSupplier)
      Returns an iterator of the objects stored in the PathTrie, using all possible TrieMatchingMode modes.
      • Methods inherited from class java.lang.Object

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

      • insert

        public void insert​(java.lang.String path,
                           T value)
      • insertOrUpdate

        public void insertOrUpdate​(java.lang.String path,
                                   T value,
                                   java.util.function.BiFunction<T,​T,​T> updater)
        Insert a value for the given path. If the path already exists, replace the value with:
         value = updater.apply(oldValue, newValue);
         
        allowing the value to be updated if desired.
      • retrieve

        public T retrieve​(java.lang.String path)
      • retrieve

        public T retrieve​(java.lang.String path,
                          java.util.Map<java.lang.String,​java.lang.String> params)
      • retrieve

        public T retrieve​(java.lang.String path,
                          java.util.Map<java.lang.String,​java.lang.String> params,
                          org.elasticsearch.common.path.PathTrie.TrieMatchingMode trieMatchingMode)
      • retrieveAll

        public java.util.Iterator<T> retrieveAll​(java.lang.String path,
                                                 java.util.function.Supplier<java.util.Map<java.lang.String,​java.lang.String>> paramSupplier)
        Returns an iterator of the objects stored in the PathTrie, using all possible TrieMatchingMode modes. The paramSupplier is called between each invocation of next() to supply a new map of parameters.