Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.util.aggregator
Class AbstractLongAggregator

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.BitHelper
          extended by com.tangosol.util.ExternalizableHelper
              extended by com.tangosol.util.aggregator.AbstractAggregator
                  extended by com.tangosol.util.aggregator.AbstractLongAggregator

All Implemented Interfaces:
ExternalizableLite, PortableObject, InvocableMap.EntryAggregator, InvocableMap.ParallelAwareAggregator, java.io.Serializable
Direct Known Subclasses:
LongMax, LongMin, LongSum

public abstract class AbstractLongAggregator
extends AbstractAggregator

Abstract aggregator that processes numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values and the result of the aggregator is a Long. If the set of entries is empty, a null result is returned.

Since:
Coherence 3.1
Author:
cp/gg/jh 2005.07.19

Field Summary
protected  int m_count
          The count of processed entries.
protected  long m_lResult
          The running result value.

 

Fields inherited from class com.tangosol.util.aggregator.AbstractAggregator
m_fParallel

 

Constructor Summary
AbstractLongAggregator()
          Default constructor (necessary for the ExternalizableLite interface).
AbstractLongAggregator(java.lang.String sMethod)
          Construct an AbstractLongAggregator object.
AbstractLongAggregator(ValueExtractor extractor)
          Construct an AbstractLongAggregator 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.

 

Methods inherited from class com.tangosol.util.aggregator.AbstractAggregator
aggregate, aggregateResults, equals, getParallelAggregator, getValueExtractor, hashCode, process, processEntry, 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

m_count

protected transient int m_count
The count of processed entries.

m_lResult

protected transient long m_lResult
The running result value.

Constructor Detail

AbstractLongAggregator

public AbstractLongAggregator()
Default constructor (necessary for the ExternalizableLite interface).

AbstractLongAggregator

public AbstractLongAggregator(ValueExtractor extractor)
Construct an AbstractLongAggregator object.
Parameters:
extractor - the extractor that provides a value in the form of any Java object that is a Number

AbstractLongAggregator

public AbstractLongAggregator(java.lang.String sMethod)
Construct an AbstractLongAggregator object.
Parameters:
sMethod - the name of the method that returns a value in the form of any Java object that is a Number

Method Detail

init

protected void init(boolean fFinal)
Initialize the aggregation result.
Specified by:
init in class AbstractAggregator
Parameters:
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

finalizeResult

protected java.lang.Object finalizeResult(boolean fFinal)
Obtain the result of the aggregation.

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.

Specified by:
finalizeResult in class AbstractAggregator
Parameters:
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 used
Returns:
the result of the aggregation process

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.