|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-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.AbstractComparableAggregator
public abstract class AbstractComparableAggregator
Abstract aggregator that processes values extracted from a set of entries in a Map, with knowledge of how to compare those values. There are two way to use the AbstractComparableAggregator:
Comparable, orComparator object.If the set of entries passed to AbstractAggregator.aggregate(java.util.Set) is empty, a null result is returned.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.tangosol.util.InvocableMap.ParallelAwareAggregator |
|---|
InvocableMap.ParallelAwareAggregator.PartialResultAggregator |
| Field Summary | |
|---|---|
protected java.util.Comparator |
m_comparatorThe comparator to use for comparing extracted values. |
protected int |
m_countThe count of processed entries. |
protected java.lang.Object |
m_oResultThe running result value. |
| Fields inherited from class com.tangosol.util.aggregator.AbstractAggregator |
|---|
m_fParallel |
| Constructor Summary | |
|---|---|
AbstractComparableAggregator()Default constructor (necessary for the ExternalizableLite interface). |
|
AbstractComparableAggregator(java.lang.String sMethod)Construct an AbstractComparableAggregator object. |
|
AbstractComparableAggregator(ValueExtractor extractor)Construct an AbstractComparableAggregator object. |
|
AbstractComparableAggregator(ValueExtractor extractor, java.util.Comparator comparator)Construct an AbstractComparableAggregator object. |
|
| Method Summary | |
|---|---|
protected java.lang.Object |
finalizeResult(boolean fFinal)Obtain the result of the aggregation. |
protected void |
init(boolean fFinal)Initialize the aggregation 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. |
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.aggregator.AbstractAggregator |
|---|
aggregate, aggregateResults, equals, getParallelAggregator, getValueExtractor, hashCode, process, processEntry, toString |
| 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, toBytes, toBytes, toBytes, toBytes, toInt, toInt, toLong, toLong |
| Field Detail |
|---|
protected transient int m_count
protected transient java.lang.Object m_oResult
protected java.util.Comparator m_comparator
| Constructor Detail |
|---|
public AbstractComparableAggregator()
public AbstractComparableAggregator(ValueExtractor extractor)
extractor - the extractor that provides a value in the form of any object that implements the Comparable interface
public AbstractComparableAggregator(ValueExtractor extractor,
java.util.Comparator comparator)
extractor - the extractor that provides an object to be comparedcomparator - the comparator used to compare the extracted objectpublic AbstractComparableAggregator(java.lang.String sMethod)
sMethod - the name of the method that returns a value in the form of any object that implements the Comparable interface| Method Detail |
|---|
protected void init(boolean fFinal)
init in class AbstractAggregatorfFinal - 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 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.
finalizeResult in class AbstractAggregatorfFinal - 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 used
public void readExternal(java.io.DataInput in)
throws java.io.IOException
readExternal in interface ExternalizableLitereadExternal in class AbstractAggregatorin - 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 ExternalizableLitewriteExternal in class AbstractAggregatorout - 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 PortableObjectreadExternal in class AbstractAggregatorin - 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 PortableObjectwriteExternal in class AbstractAggregatorout - the PofWriter to which to write the object's statejava.io.IOException - if an I/O error occurs
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||