Class ReadWriteBackingMap.CacheLoaderCacheStore

    • Constructor Detail

      • CacheLoaderCacheStore

        public CacheLoaderCacheStore​(CacheLoader loader)
        Construct a CacheLoaderCacheStore.
        Parameters:
        loader - the CacheLoader to wrap
    • Method Detail

      • load

        public Object load​(Object oKey)
        Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.
        Specified by:
        load in interface CacheLoader
        Specified by:
        load in class AbstractCacheLoader
        Parameters:
        oKey - key whose associated value is to be returned
        Returns:
        the value associated with the specified key, or null if no value is available for that key
      • loadAll

        public Map loadAll​(Collection colKeys)
        Return the values associated with each the specified keys in the passed collection. If a key does not have an associated value in the underlying store, then the return map will not have an entry for that key.

        The default implementation of this method calls CacheLoader.load(K) for each key in the supplied Collection. Implementations that can optimize multi-key operations should override this default implementation.

        Parameters:
        colKeys - a collection of keys to load
        Returns:
        a Map of keys to associated values for the specified keys
      • getCacheLoader

        protected CacheLoader getCacheLoader()
        The wrapped CacheLoader.
        Returns:
        the underlying CacheLoader that this CacheStore wraps