Interface SingleCache<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T getCache()
      This can be used for scopes that will only every be created once.
      boolean isCacheSet()
      Returns true if this cache has been set
      void releaseCache()
      Removes the cached value and makes it such that this cache has not been set
      void setCache​(T cacheMe)
      Sets the value into the cache
    • Method Detail

      • getCache

        T getCache()
        This can be used for scopes that will only every be created once. The returned value must have been set previously with setCache. If this is called when isCacheSet is false will result in a RuntimeException
        Returns:
        A value cached with this ActiveDescriptor
      • isCacheSet

        boolean isCacheSet()
        Returns true if this cache has been set
        Returns:
        true if there is a currently cached value, false otherwise
      • setCache

        void setCache​(T cacheMe)
        Sets the value into the cache
        Parameters:
        cacheMe - A single value that can be cached in this active descriptor
      • releaseCache

        void releaseCache()
        Removes the cached value and makes it such that this cache has not been set