|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.BitHelper
com.tangosol.util.ExternalizableHelper
com.tangosol.util.aggregator.AbstractAggregator
com.tangosol.util.aggregator.ReducerAggregator
public class ReducerAggregator
The ReducerAggregator is used to implement functionality similar to CacheMap.getAll(Collection)
API. Instead of returning the complete set of values, it will return a portion of value attributes based on the provided ValueExtractor
. <p/> This aggregator could be used in combination with MultiExtractor
allowing one to collect tuples that are a subset of the attributes of each object stored in the cache.
Field Summary | |
---|---|
protected Map |
m_map The resulting map of reduced values. |
Fields inherited from class com.tangosol.util.aggregator.AbstractAggregator |
---|
m_fParallel |
Constructor Summary | |
---|---|
ReducerAggregator() Default constructor (necessary for the ExternalizableLite interface). |
|
ReducerAggregator(String sMethod) Construct a ReducerAggregator based on the specified method name. |
|
ReducerAggregator(ValueExtractor extractor) Construct a ReducerAggregator based on the specified extractor. |
Method Summary | |
---|---|
protected Map |
ensureMap() Return a map that can be used to store reduced values, creating it if one has not already been created. |
protected Object |
finalizeResult(boolean fFinal) Obtain the result of the aggregation. |
protected void |
init(boolean fFinal) Initialize the aggregation result. |
protected void |
process(Object o, boolean fFinal) Incorporate one aggregatable value into the result. |
protected void |
processEntry(InvocableMap.Entry entry) Incorporate one aggregatable entry into the result. |
Methods inherited from class com.tangosol.util.aggregator.AbstractAggregator |
---|
aggregate, aggregateResults, equals, getParallelAggregator, getValueExtractor, hashCode, readExternal, readExternal, toString, writeExternal, writeExternal |
Methods inherited from class com.tangosol.util.BitHelper |
---|
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString |
Field Detail |
---|
protected transient Map m_map
Constructor Detail |
---|
public ReducerAggregator()
public ReducerAggregator(String sMethod)
sMethod
- the name of the method that is used to extract the portion of the cached valuepublic ReducerAggregator(ValueExtractor extractor)
extractor
- the extractor that is used to extract the portion of the cached valueMethod Detail |
---|
protected void init(boolean fFinal)
init
in class AbstractAggregator
fFinal
- true is passed if the aggregation process that is being initialized must produce a final aggregation result; this will only be false if a parallel approach is being used and the initial (partial) aggregation process is being initializedprotected void processEntry(InvocableMap.Entry entry)
processEntry
in class AbstractAggregator
entry
- the entry to incorporate into the aggregation resultprotected void process(Object o, boolean fFinal)
InvocableMap.Entry
.process
in class AbstractAggregator
o
- the value to incorporate into the aggregated resultfFinal
- true to indicate that the given object is a partial result returned by a parallel aggregatorprotected Object finalizeResult(boolean fFinal)
finalizeResult
in class AbstractAggregator
fFinal
- true to indicate that the final result of the aggregation process should be returned; this will only be false if a parallel approach is being usedprotected Map ensureMap()
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |