Interface CuratorCacheAccessor
- All Known Subinterfaces:
CuratorCache,CuratorCacheBridge,CuratorCacheStorage
public interface CuratorCacheAccessor
Methods to access the underlying storage
-
Method Summary
Modifier and TypeMethodDescriptionReturn an entry from storageparentPathFilter(String parentPath) Filter for a ChildData stream.intsize()Return the current number of entries in storagestream()Return a stream over the storage entries.
-
Method Details
-
get
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
Return a stream over the storage entries. Note: for a standard storage instance, the stream behaves like a stream returned byConcurrentHashMap.entrySet()- Returns:
- stream over entries
-
parentPathFilter
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
-