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.
|
parentPathFilter
static 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 CuratorCacheAccessor
path
- path to getempty()
int size()
size
in interface CuratorCacheAccessor
Stream<ChildData> stream()
ConcurrentHashMap.entrySet()
stream
in interface CuratorCacheAccessor
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.