Class BundlingNamedCache

    • Constructor Detail

      • BundlingNamedCache

        public BundlingNamedCache​(NamedCache cache)
        Construct a BundlingNamedCache based on the specified NamedCache.
        Parameters:
        cache - the NamedCache that will be wrapped by this BundlingNamedCache
    • Method Detail

      • ensureGetBundler

        public AbstractBundler ensureGetBundler​(int cBundleThreshold)
        Configure the bundler for the "get" operations. If the bundler does not exist and bundling is enabled, it will be instantiated.
        Parameters:
        cBundleThreshold - the bundle size threshold; pass zero to disable "get" operation bundling
        Returns:
        the "get" bundler or null if bundling is disabled
      • ensurePutBundler

        public AbstractBundler ensurePutBundler​(int cBundleThreshold)
        Configure the bundler for the "put" operations. If the bundler does not exist and bundling is enabled, it will be instantiated.
        Parameters:
        cBundleThreshold - the bundle size threshold; pass zero to disable "put" operation bundling
        Returns:
        the "put" bundler or null if bundling is disabled
      • ensureRemoveBundler

        public AbstractBundler ensureRemoveBundler​(int cBundleThreshold)
        Configure the bundler for the "remove" operations. If the bundler does not exist and bundling is enabled, it will be instantiated.
        Parameters:
        cBundleThreshold - the bundle size threshold; pass zero to disable "remove" operation bundling
        Returns:
        the "remove" bundler or null if bundling is disabled
      • getGetBundler

        public AbstractBundler getGetBundler()
        Obtain the bundler for the "get" operations.
        Returns:
        the "get" bundler
      • getPutBundler

        public AbstractBundler getPutBundler()
        Obtain the bundler for the "put" operations.
        Returns:
        the "put" bundler
      • getRemoveBundler

        public AbstractBundler getRemoveBundler()
        Obtain the bundler for the "remove" operations.
        Returns:
        the "remove" bundler
      • getAll

        public Map getAll​(Collection colKeys)
        Get all the specified keys, if they are in the Map. For each key that is in the cache, that key and its corresponding value will be placed in the map that is returned by this method. The absence of a key in the returned map indicates that it was not in the cache, which may imply (for caches that can load behind the scenes) that the requested data could not be loaded.
        Specified by:
        getAll in interface CacheMap
        Specified by:
        getAll in interface NamedMap
        Overrides:
        getAll in class WrapperNamedCache
        Parameters:
        colKeys - a collection of keys that may be in the named cache
        Returns:
        a Map of keys to values for the specified keys passed in colKeys
      • put

        public Object put​(Object oKey,
                          Object oValue)
        Associates the specified value with the specified key in this map.

        Note: this method always returns null.

        Specified by:
        put in interface CacheMap
        Specified by:
        put in interface ConcurrentMap
        Specified by:
        put in interface Map
        Overrides:
        put in class WrapperConcurrentMap
        Parameters:
        oKey - key with which the specified value is to be associated
        oValue - value to be associated with the specified key
        Returns:
        previous value associated with specified key, or null if there was no mapping for key
      • putAll

        public void putAll​(Map map)
        Copies all of the mappings from the specified map to this map. The effect of this call is equivalent to that of calling AbstractKeyBasedMap.put(K, V) on this map once for each mapping in the passed map. The behavior of this operation is unspecified if the passed map is modified while the operation is in progress.
        Specified by:
        putAll in interface ConcurrentMap
        Specified by:
        putAll in interface Map
        Overrides:
        putAll in class WrapperConcurrentMap
        Parameters:
        map - the Map containing the key/value pairings to put into this Map
      • remove

        public Object remove​(Object oKey)
        Removes the mapping for this key from this map if present. Expensive: updates both the underlying cache and the local cache.

        Note: this method always returns null.

        Specified by:
        remove in interface ConcurrentMap
        Specified by:
        remove in interface Map
        Overrides:
        remove in class WrapperConcurrentMap
        Parameters:
        oKey - key whose mapping is to be removed from the map
        Returns:
        previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.