public interface CuratorCacheStorage extends CuratorCacheAccessor
CuratorCache| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Reset the storage to zero entries
|
static CuratorCacheStorage |
dataNotCached()
Return a new storage instance that does not retain the data bytes.
|
Optional<ChildData> |
get(String path)
Return an entry from storage
|
Optional<ChildData> |
put(ChildData data)
Add an entry to storage and return any previous entry at that path
|
Optional<ChildData> |
remove(String path)
Remove the entry from storage and return any previous entry at that path
|
int |
size()
Return the current number of entries in storage
|
static CuratorCacheStorage |
standard()
Return a new standard storage instance
|
Stream<ChildData> |
stream()
Return a stream over the storage entries.
|
parentPathFilterstatic CuratorCacheStorage standard()
static CuratorCacheStorage dataNotCached()
null for ChildData.getData().Optional<ChildData> put(ChildData data)
data - entry to addempty()Optional<ChildData> remove(String path)
path - path to removeempty()void clear()
Optional<ChildData> get(String path)
get in interface CuratorCacheAccessorpath - path to getempty()int size()
size in interface CuratorCacheAccessorStream<ChildData> stream()
ConcurrentHashMap.entrySet()stream in interface CuratorCacheAccessorCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.