| 
CoherenceTM v3.3  Copyright© 2000-2007 by Oracle Corporation  | 
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.tangosol.util.Base
com.tangosol.util.BitHelper
com.tangosol.util.ExternalizableHelper
com.tangosol.util.aggregator.AbstractAggregator
com.tangosol.util.aggregator.DistinctValues
public class DistinctValues
Return the set of unique values extracted from a set of entries in a Map. If the set of entries is empty, an empty set is returned.
This aggregator could be used in combination withMultiExtractor allowing
 to collect all unique combinations (tuples) of a given set of attributes.
 
 The DistinctValues aggregator covers a simple case of a more generic
 aggregation pattern implemented by the GroupAggregator, which in
 addition to collecting all distinct values or tuples, runs an aggregation
 against each distinct entry set (group).
| Field Summary | |
|---|---|
protected  Set | 
m_set
The resulting set of distinct values.  | 
| Fields inherited from class com.tangosol.util.aggregator.AbstractAggregator | 
|---|
m_fParallel | 
| Constructor Summary | |
|---|---|
DistinctValues()
Default constructor (necessary for the ExternalizableLite interface).  | 
|
DistinctValues(String sMethod)
Construct an DistinctValues aggregator.  | 
|
DistinctValues(ValueExtractor extractor)
Construct a DistinctValues aggregator.  | 
|
| Method Summary | |
|---|---|
protected  Set | 
ensureSet()
Return a set that can be used to store distinct 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.  | 
| 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, toBitString, toBitString, toBitString | 
| Field Detail | 
|---|
protected transient Set m_set
| Constructor Detail | 
|---|
public DistinctValues()
public DistinctValues(ValueExtractor extractor)
extractor - the extractor that provides a value in the form of
                   any Java objectpublic DistinctValues(String sMethod)
sMethod - the name of the method that returns a value in the form
                 of any Java object| 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 initialized
protected void process(Object o,
                       boolean fFinal)
InvocableMap.Entry.
process in class AbstractAggregatoro - 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 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
protected Set ensureSet()
  | 
CoherenceTM v3.3  Copyright© 2000-2007 by Oracle Corporation  | 
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||