|
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
public abstract class AbstractAggregator
Abstract base class implementation of InvocableMap.EntryAggregator that supports parallel aggregation.
| Field Summary | |
|---|---|
protected boolean |
m_fParallelSet to true if this aggregator realizes that it is going to be used in parallel. |
| Constructor Summary | |
|---|---|
AbstractAggregator()Default constructor (necessary for the ExternalizableLite interface). |
|
AbstractAggregator(String sMethod)Construct an AbstractAggregator that will aggregate values extracted from a set of InvocableMap.Entry objects. |
|
AbstractAggregator(ValueExtractor extractor)Construct an AbstractAggregator that will aggregate values extracted from a set of InvocableMap.Entry objects. |
|
| Method Summary | |
|---|---|
Object |
aggregate(Set setEntries)Process a set of InvocableMap.Entry objects in order to produce an aggregated result. |
Object |
aggregateResults(Collection collResults)Aggregate the results of the parallel aggregations. |
boolean |
equals(Object o)Compares this object with another object for equality. |
protected abstract Object |
finalizeResult(boolean fFinal)Obtain the result of the aggregation. |
InvocableMap.EntryAggregator |
getParallelAggregator()Get an aggregator that can take the place of this aggregator in situations in which the InvocableMap can aggregate in parallel. |
ValueExtractor |
getValueExtractor()Determine the ValueExtractor whose values this aggregator is aggregating. |
int |
hashCode()Returns a hash code value for this object. |
protected abstract void |
init(boolean fFinal)Initialize the aggregation result. |
protected abstract 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. |
void |
readExternal(DataInput in)Restore the contents of this object by loading the object's state from the passed DataInput object. |
void |
readExternal(PofReader in)Restore the contents of a user type instance by reading its state using the specified PofReader object. |
String |
toString()Provide a human-readable representation of this object. |
void |
writeExternal(DataOutput out)Save the contents of this object by storing the object's state into the passed DataOutput object. |
void |
writeExternal(PofWriter out)Save the contents of a POF user type instance by writing its state using the specified PofWriter object. |
| 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 boolean m_fParallel
| Constructor Detail |
|---|
public AbstractAggregator()
public AbstractAggregator(ValueExtractor extractor)
InvocableMap.Entry objects.
extractor - the extractor that provides values to aggregatepublic AbstractAggregator(String sMethod)
InvocableMap.Entry objects.
sMethod - the name of the method that could be invoked via reflection and that returns values to aggregate; this parameter can also be a dot-delimited sequence of method names which would result in an aggregator based on the ChainedExtractor that is based on an array of corresponding ReflectionExtractor objects| Method Detail |
|---|
public Object aggregate(Set setEntries)
aggregate in interface InvocableMap.EntryAggregatorsetEntries - a Set of read-only InvocableMap.Entry objects to aggregateprotected void processEntry(InvocableMap.Entry entry)
entry - the entry to incorporate into the aggregation resultpublic InvocableMap.EntryAggregator getParallelAggregator()
getParallelAggregator in interface InvocableMap.ParallelAwareAggregatorpublic Object aggregateResults(Collection collResults)
aggregateResults in interface InvocableMap.ParallelAwareAggregatorcollResults - the parallel aggregation resultspublic ValueExtractor getValueExtractor()
protected abstract void init(boolean fFinal)
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 initialized
protected abstract void process(Object o,
boolean fFinal)
InvocableMap.Entry.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 abstract Object finalizeResult(boolean fFinal)
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 usedpublic String toString()
public int hashCode()
public boolean equals(Object o)
o - an object reference or null
public void readExternal(DataInput in)
throws IOException
readExternal in interface ExternalizableLitein - the DataInput stream to read data from in order to restore the state of this objectIOException - if an I/O exception occursNotActiveException - if the object is not in its initial state, and therefore cannot be deserialized into
public void writeExternal(DataOutput out)
throws IOException
writeExternal in interface ExternalizableLiteout - the DataOutput stream to write the state of this object toIOException - if an I/O exception occurs
public void readExternal(PofReader in)
throws IOException
readExternal in interface PortableObjectin - the PofReader from which to read the object's stateIOException - if an I/O error occurs
public void writeExternal(PofWriter out)
throws IOException
writeExternal in interface PortableObjectout - the PofWriter to which to write the object's stateIOException - if an I/O error occurs
|
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 | |||||||