Class SmartCache

java.lang.Object
org.uitnet.testing.smartfwk.ui.core.cache.SmartCache
Direct Known Subclasses:
DefaultSmartCache

public abstract class SmartCache
extends Object
Abstract SmartCache class that can be used to store the data and can be retrieved at any time. Also you can use events to inform subscriber for the change of cached data. NOTE: To use this cache, create a singleton class that extends this cache or you can use the default implementation DefaultSmartCache.
Author:
Madhav Krishna
  • Constructor Details

    • SmartCache

      public SmartCache()
  • Method Details

    • add

      public <V> void add​(String key, V value)
    • get

      public <V> V get​(String key)
    • removeAndget

      public <V> V removeAndget​(String key)
    • clear

      public void clear()
    • getKeysStartsWith

      public Set<String> getKeysStartsWith​(String startsWithStr)
    • getKeysEndsWith

      public Set<String> getKeysEndsWith​(String endsWithStr)
    • isKeyPresent

      public boolean isKeyPresent​(String key)
    • subscribe

      public void subscribe​(SmartCacheSubscriber subscriber)
    • publish

      public void publish​(SmartCache cache)