Interface ICache


  • public interface ICache
    A cache that is associated with a synchronization that allows clients to cache synchronization state related to their model for the duration of the operation. When the context is disposed, the cache will be disposed and any listeners notified.
    Since:
    3.2
    Restriction:
    This interface is not intended to be implemented by clients.
    • Method Detail

      • put

        void put​(String name,
                 Object value)
        Cache the given object with this context.
        Parameters:
        name - the name that uniquely identifies the object
        value - the value to be cached.
      • get

        Object get​(String name)
        Retrieve an object that has been cached with the context
        Parameters:
        name - the name of the object
        Returns:
        the object associated with the name or null
      • remove

        void remove​(String name)
        Remove the named object from the cache
        Parameters:
        name - the name
      • addCacheListener

        void addCacheListener​(ICacheListener listener)
        Add a listener to the cache that will receive notification when the cache is disposed. Adding a listener that has already been added has no effect.
        Parameters:
        listener - the listener to add
      • removeCacheListener

        void removeCacheListener​(ICacheListener listener)
        Remove the listener. Removing a listener that is not registered has no effect.
        Parameters:
        listener - the listener to remove
        Since:
        3.3