Interface CuratorCacheAccessor

    • Method Detail

      • get

        java.util.Optional<ChildData> get​(java.lang.String path)
        Return an entry from storage
        Parameters:
        path - path to get
        Returns:
        entry or empty()
      • size

        int size()
        Return the current number of entries in storage
        Returns:
        number of entries
      • stream

        java.util.stream.Stream<ChildData> stream()
        Return a stream over the storage entries. Note: for a standard storage instance, the stream behaves like a stream returned by ConcurrentHashMap.entrySet()
        Returns:
        stream over entries
      • parentPathFilter

        static java.util.function.Predicate<ChildData> parentPathFilter​(java.lang.String parentPath)
        Filter for a ChildData stream. Only ChildDatas with the given parent path pass the filter. This is useful to stream one level below a given path in the cache. e.g. to stream only the first level below the root of the cache.
         CuratorCache cache = ...
         cache.stream().filter(parentPathFilter(root))... // etc
         
        Parameters:
        parentPath - the parent path to filter on
        Returns:
        filtered stream