Interface CachedModeledFramework<T>

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable, ModeledFramework<T>

    public interface CachedModeledFramework<T>
    extends ModeledFramework<T>, java.io.Closeable
    • Method Detail

      • cache

        ModeledCache<T> cache()
        Return the cache instance
        Returns:
        cache
      • start

        void start()
        Start the internally created cache
      • close

        void close()
        Close/stop the internally created cache
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • listenable

        org.apache.curator.framework.listen.Listenable<ModeledCacheListener<T>> listenable()
        Return the listener container so that you can add/remove listeners
        Returns:
        listener container
      • child

        CachedModeledFramework<T> child​(java.lang.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().

        Specified by:
        child in interface ModeledFramework<T>
        Parameters:
        child - child node.
        Returns:
        new Modeled Curator instance
      • withPath

        CachedModeledFramework<T> withPath​(ZPath path)
        Return a Modeled Curator instance with all the same options but using the given path.
        Specified by:
        withPath in interface ModeledFramework<T>
        Parameters:
        path - new path
        Returns:
        new Modeled Curator instance
      • list

        AsyncStage<java.util.List<T>> list()
        Return the instances of the base path of this cached framework
        Returns:
        listing of all models in the base path