Skip navigation links
com.tangosol.net.cache
Class BundlingNamedCache
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.AbstractKeyBasedMap
com.tangosol.util.AbstractKeySetBasedMap
com.tangosol.util.WrapperObservableMap
com.tangosol.util.WrapperConcurrentMap
com.tangosol.net.cache.WrapperNamedCache
com.tangosol.net.cache.BundlingNamedCache
- All Implemented Interfaces:
- CacheMap, NamedCache, ConcurrentMap, InvocableMap, ObservableMap, QueryMap, Map
-
public class BundlingNamedCache
- extends WrapperNamedCache
Bundling NamedCache implementation.
- Since:
- Coherence 3.3
- Author:
- gg 2007.02.13
- See Also:
AbstractBundler
Method Summary |
AbstractBundler |
ensureGetBundler(int cBundleThreshold)
Configure the bundler for the "get" operations. |
AbstractBundler |
ensurePutBundler(int cBundleThreshold)
Configure the bundler for the "put" operations. |
AbstractBundler |
ensureRemoveBundler(int cBundleThreshold)
Configure the bundler for the "remove" operations. |
Object |
get(Object oKey)
Returns the value to which this map maps the specified key. |
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. |
AbstractBundler |
getGetBundler()
Obtain the bundler for the "get" operations. |
AbstractBundler |
getPutBundler()
Obtain the bundler for the "put" operations. |
AbstractBundler |
getRemoveBundler()
Obtain the bundler for the "remove" operations. |
Object |
put(Object oKey, Object oValue)
Associates the specified value with the specified key in this map. Note: this method always returns null. |
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(java.lang.Object, java.lang.Object) 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. |
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. |
Methods inherited from class com.tangosol.net.cache.WrapperNamedCache |
addIndex, aggregate, aggregate, destroy, entrySet, entrySet, getCacheName, getCacheService, invoke, invokeAll, invokeAll, isActive, keySet, put, release, removeIndex |
Methods inherited from class com.tangosol.util.WrapperConcurrentMap |
clear, getDescription, getLockDescription, getWaitMillis, instantiateLock, isInternalKeySetIteratorMutable, isLockingEnforced, lock, lock, removeBlind, setLockingEnforced, setWaitMillis, toString, unlock |
Methods inherited from class com.tangosol.util.WrapperObservableMap |
addMapListener, addMapListener, addMapListener, containsValue, dispatchEvent, dispatchPendingEvent, ensureInternalListener, ensureMapListenerSupport, getCacheStatistics, getInternalKeySet, getMap, getMapListenerSupport, hasListeners, instantiateInternalListener, isCollectStats, isEventFabricator, isSynthetic, isTranslateEvents, removeMapListener, removeMapListener, removeMapListener, setCollectStats, setTranslateEvents |
BundlingNamedCache
public BundlingNamedCache(NamedCache cache)
- Construct a BundlingNamedCache based on the specified NamedCache.
- Parameters:
cache
- the NamedCache that will be wrapped by this BundlingNamedCache
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
get
public Object get(Object oKey)
- Returns the value to which this map maps the specified key.
-
- Specified by:
get
in interface ConcurrentMap
- Specified by:
get
in interface Map
- Overrides:
get
in class WrapperObservableMap
-
- Parameters:
oKey
- the key object
- Returns:
- the value to which this map maps the specified key, or null if the map contains no mapping for this key
- See Also:
Map.containsKey(Object)
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
- 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(java.lang.Object, java.lang.Object)
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.
Skip navigation links
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.