|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-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(java.lang.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 | |
|---|---|
java.lang.Object |
aggregate(java.util.Set setEntries)Process a set of InvocableMap.Entry objects in order to produce an aggregated result. |
java.lang.Object |
aggregateResults(java.util.Collection collResults)Aggregate the results of the parallel aggregations. |
boolean |
equals(java.lang.Object o)Compares this object with another object for equality. |
protected abstract java.lang.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(java.lang.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(java.io.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. |
java.lang.String |
toString()Provide a human-readable representation of this object. |
void |
writeExternal(java.io.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(java.lang.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 java.lang.Object aggregate(java.util.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 java.lang.Object aggregateResults(java.util.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(java.lang.Object o,
boolean fFinal)
If the fFinal parameter is true, the given object is a partial result (returned by an individual parallel aggregator) that should be incorporated into the final result; otherwise, the object is a value extracted from an 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 java.lang.Object finalizeResult(boolean fFinal)
If the fFinal parameter is true, the returned object must be the final result of the aggregation; otherwise, the returned object will be treated as a partial result that should be incorporated into the final result.
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 java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object o)
o - an object reference or null
public void readExternal(java.io.DataInput in)
throws java.io.IOException
readExternal in interface ExternalizableLitein - the DataInput stream to read data from in order to restore the state of this objectjava.io.IOException - if an I/O exception occursjava.io.NotActiveException - if the object is not in its initial state, and therefore cannot be deserialized into
public void writeExternal(java.io.DataOutput out)
throws java.io.IOException
writeExternal in interface ExternalizableLiteout - the DataOutput stream to write the state of this object tojava.io.IOException - if an I/O exception occurs
public void readExternal(PofReader in)
throws java.io.IOException
readExternal in interface PortableObjectin - the PofReader from which to read the object's statejava.io.IOException - if an I/O error occurs
public void writeExternal(PofWriter out)
throws java.io.IOException
writeExternal in interface PortableObjectout - the PofWriter to which to write the object's statejava.io.IOException - if an I/O error occurs
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||