Oracle® Coherence Java API Reference
v3.5

E14977-01

com.tangosol.net.cache
Class AbstractKeyBundler

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.net.cache.AbstractBundler
          extended by com.tangosol.net.cache.AbstractKeyBundler
Direct Known Subclasses:
BundlingNamedCache.GetBundler, BundlingNamedCache.RemoveBundler, ReadWriteBackingMap.CacheStoreWrapper.EraseBundler, ReadWriteBackingMap.CacheStoreWrapper.LoadBundler

public abstract class AbstractKeyBundler
extends AbstractBundler

An abstract key-based bundler serves as a base for NamedCache get() and remove() operation bundling as well as the CacheStore load() and erase() operation bundling.

Since:
Coherence 3.3
Author:
gg 2007.01.28

Nested Class Summary
protected  class AbstractKeyBundler.Bundle
           
 
Nested classes/interfaces inherited from class com.tangosol.net.cache.AbstractBundler
AbstractBundler.Statistics
 
Field Summary
 
Fields inherited from class com.tangosol.net.cache.AbstractBundler
ADJUSTMENT_FREQUENCY, m_countThreads, m_dPreviousSizeThreshold, m_listBundle
 
Constructor Summary
AbstractKeyBundler()
           
 
Method Summary
protected abstract  java.util.Map bundle(java.util.Collection colKeys)
          The bundle operation to be performed against a collected set of keys by the concrete AbstractKeyBundler implementations.
protected  AbstractBundler.Bundle instantiateBundle()
          Instantiate a new Bundle object.
protected  java.lang.Object process(java.lang.Object oKey)
          Process the specified key in a most optimal way according to the bundle settings.
protected  java.util.Map processAll(java.util.Collection colKeys)
          Process a colKeys of specified items in a most optimal way according to the bundle settings.
protected abstract  java.lang.Object unbundle(java.lang.Object oKey)
          Un-bundle bundled operation.
 
Methods inherited from class com.tangosol.net.cache.AbstractBundler
adjust, getDelayMillis, getOpenBundle, getSizeThreshold, getThreadThreshold, isAllowAutoAdjust, resetStatistics, setAllowAutoAdjust, setDelayMillis, setSizeThreshold, setThreadThreshold, toString, updateStatistics
 

Constructor Detail

AbstractKeyBundler

public AbstractKeyBundler()
Method Detail

process

protected java.lang.Object process(java.lang.Object oKey)
Process the specified key in a most optimal way according to the bundle settings.

Parameters:
oKey - the key to process
Returns:
an execution result according to the caller's contract

processAll

protected java.util.Map processAll(java.util.Collection colKeys)
Process a colKeys of specified items in a most optimal way according to the bundle settings.

Parameters:
colKeys - the collection of keys to process
Returns:
an execution result according to the caller's contract

bundle

protected abstract java.util.Map bundle(java.util.Collection colKeys)
The bundle operation to be performed against a collected set of keys by the concrete AbstractKeyBundler implementations. If an exception occurs during bundle operation, it could be repeated using singleton sets.

Parameters:
colKeys - a key collection to perform the bundled operation for

unbundle

protected abstract java.lang.Object unbundle(java.lang.Object oKey)
Un-bundle bundled operation. This opeartion would be used if an exception occurs during bundle operation or if the number of active threads is below the ThreadThreshold value.

Parameters:
oKey - a key to perform the un-bundled operation for

instantiateBundle

protected AbstractBundler.Bundle instantiateBundle()
Instantiate a new Bundle object.

Specified by:
instantiateBundle in class AbstractBundler
Returns:
a new Bundle object

Oracle® Coherence Java API Reference
v3.5

E14977-01

Copyright © 2000, 2009, Oracle. All rights reserved.