public interface CachedModeledFramework<T> extends ModeledFramework<T>, Closeable
Modifier and Type | Method and Description |
---|---|
ModeledCache<T> |
cache()
Return the cache instance
|
CachedModeledFramework<T> |
child(Object child)
Return a new Modeled Curator instance with all the same options but applying to the given child node of this Modeled Curator's
path.
|
AsyncStage<List<ZNode<T>>> |
childrenAsZNodes()
Same as
ModeledFramework.childrenAsZNodes()
but always reads from cache - i.e. |
void |
close()
Close/stop the internally created cache
|
AsyncStage<List<T>> |
list()
Return the instances of the base path of this cached framework
|
Listenable<ModeledCacheListener<T>> |
listenable()
Return the listener container so that you can add/remove listeners
|
AsyncStage<T> |
readThrough()
Same as
ModeledFramework.read() except that if the cache does not have a value
for this path a direct query is made. |
AsyncStage<T> |
readThrough(org.apache.zookeeper.data.Stat storingStatIn)
Same as
ModeledFramework.read(org.apache.zookeeper.data.Stat) except that if the cache does not have a value
for this path a direct query is made. |
AsyncStage<ZNode<T>> |
readThroughAsZNode()
Same as
ModeledFramework.readAsZNode() except that if the cache does not have a value
for this path a direct query is made. |
void |
start()
Start the internally created cache
|
CachedModeledFramework<T> |
withPath(ZPath path)
Return a Modeled Curator instance with all the same options but using the given path.
|
builder, builder, cached, cached, checkExists, checkExistsOp, checkExistsOp, children, createOp, delete, delete, deleteOp, deleteOp, inTransaction, modelSpec, parent, read, read, readAsZNode, set, set, set, set, unwrap, update, update, updateOp, updateOp, versioned, wrap
ModeledCache<T> cache()
void start()
void close()
close
in interface AutoCloseable
close
in interface Closeable
Listenable<ModeledCacheListener<T>> listenable()
AsyncStage<List<ZNode<T>>> childrenAsZNodes()
ModeledFramework.childrenAsZNodes()
but always reads from cache - i.e. no additional queries to ZooKeeper are madechildrenAsZNodes
in interface ModeledFramework<T>
AsyncStage
CachedModeledFramework<T> child(Object child)
Return a new Modeled Curator instance with all the same options but applying to the given child node of this Modeled Curator's
path. E.g. if this Modeled Curator instance applies to "/a/b", calling modeled.at("c")
returns an instance that applies to
"/a/b/c".
The replacement is the toString()
value of child or,
if it implements NodeName
,
the value of nodeName()
.
child
in interface ModeledFramework<T>
child
- child node.CachedModeledFramework<T> withPath(ZPath path)
withPath
in interface ModeledFramework<T>
path
- new pathAsyncStage<T> readThrough()
ModeledFramework.read()
except that if the cache does not have a value
for this path a direct query is made.AsyncStage
AsyncStage<T> readThrough(org.apache.zookeeper.data.Stat storingStatIn)
ModeledFramework.read(org.apache.zookeeper.data.Stat)
except that if the cache does not have a value
for this path a direct query is made.storingStatIn
- the stat for the new ZNode is stored hereAsyncStage
AsyncStage<ZNode<T>> readThroughAsZNode()
ModeledFramework.readAsZNode()
except that if the cache does not have a value
for this path a direct query is made.AsyncStage
AsyncStage<List<T>> list()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.