Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.net.cache
Class BundlingNamedCache

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.AbstractKeyBasedMap
          extended by com.tangosol.util.AbstractKeySetBasedMap
              extended by com.tangosol.util.WrapperObservableMap
                  extended by com.tangosol.util.WrapperConcurrentMap
                      extended by com.tangosol.net.cache.WrapperNamedCache
                          extended by com.tangosol.net.cache.BundlingNamedCache

All Implemented Interfaces:
CacheMap, NamedCache, ConcurrentMap, InvocableMap, ObservableMap, QueryMap, java.util.Map

public class BundlingNamedCache
extends WrapperNamedCache

Bundling NamedCache implementation.

Since:
Coherence 3.3
Author:
gg 2007.02.13
See Also:
AbstractBundler

Nested Class Summary
protected  class BundlingNamedCache.GetBundler
           
protected  class BundlingNamedCache.PutBundler
           
protected  class BundlingNamedCache.RemoveBundler
           

 

Nested classes/interfaces inherited from class com.tangosol.util.WrapperConcurrentMap
WrapperConcurrentMap.Lock

 

Nested classes/interfaces inherited from class com.tangosol.util.WrapperObservableMap
WrapperObservableMap.InternalListener

 

Nested classes/interfaces inherited from class com.tangosol.util.AbstractKeySetBasedMap
AbstractKeySetBasedMap.EntrySet, AbstractKeySetBasedMap.KeyIterator, AbstractKeySetBasedMap.KeySet, AbstractKeySetBasedMap.ValuesCollection

 

Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry

 

Nested classes/interfaces inherited from interface com.tangosol.util.QueryMap
QueryMap.Entry

 

Nested classes/interfaces inherited from interface com.tangosol.util.InvocableMap
InvocableMap.Entry, InvocableMap.EntryAggregator, InvocableMap.EntryProcessor, InvocableMap.ParallelAwareAggregator

 

Field Summary

 

Fields inherited from class com.tangosol.net.cache.WrapperNamedCache
m_service, m_sName

 

Fields inherited from class com.tangosol.util.WrapperConcurrentMap
m_cWaitMillis, m_fEnforceLocking, m_gateMap, m_mapLock

 

Fields inherited from class com.tangosol.util.WrapperObservableMap
m_fTranslateEvents, m_listenerInternal, m_listenerSupport, m_map, m_stats

 

Fields inherited from interface com.tangosol.net.cache.CacheMap
EXPIRY_DEFAULT, EXPIRY_NEVER

 

Fields inherited from interface com.tangosol.util.ConcurrentMap
LOCK_ALL

 

Constructor Summary
BundlingNamedCache(NamedCache cache)
          Construct a BundlingNamedCache based on the specified NamedCache.

 

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.
 java.lang.Object get(java.lang.Object oKey)
          Returns the value to which this map maps the specified key.
 java.util.Map getAll(java.util.Collection colKeys)
          Get all the specified keys, if they are in the Map.
 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.
 java.lang.Object put(java.lang.Object oKey, java.lang.Object oValue)
          Associates the specified value with the specified key in this map.
 void putAll(java.util.Map map)
          Copies all of the mappings from the specified map to this map.
 java.lang.Object remove(java.lang.Object oKey)
          Removes the mapping for this key from this map if present.

 

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

 

Methods inherited from class com.tangosol.util.AbstractKeySetBasedMap
containsKey, instantiateEntrySet, instantiateKeyIterator, instantiateKeySet, instantiateValues, isEmpty, iterateKeys, size

 

Methods inherited from class com.tangosol.util.AbstractKeyBasedMap
clone, entrySet, equals, hashCode, keySet, values

 

Methods inherited from interface com.tangosol.util.ObservableMap
addMapListener, addMapListener, addMapListener, removeMapListener, removeMapListener, removeMapListener

 

Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, hashCode, isEmpty, keySet, size, values

 

Methods inherited from interface com.tangosol.util.ConcurrentMap
clear, containsKey, containsValue, isEmpty, lock, lock, size, unlock

 

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

get

public java.lang.Object get(java.lang.Object oKey)
Returns the value to which this map maps the specified key.
Specified by:
get in interface ConcurrentMap
Specified by:
get in interface java.util.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 java.util.Map getAll(java.util.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 java.lang.Object put(java.lang.Object oKey,
                            java.lang.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 java.util.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(java.util.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 java.util.Map
Overrides:
putAll in class WrapperConcurrentMap
Parameters:
map - the Map containing the key/value pairings to put into this Map

remove

public java.lang.Object remove(java.lang.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 java.util.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

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.