com.bigdata.btree.proc
Class LongAggregator
java.lang.Object
com.bigdata.btree.proc.LongAggregator
- All Implemented Interfaces:
- IResultHandler<Long,Long>
public class LongAggregator
- extends Object
- implements IResultHandler<Long,Long>
Aggregates the value of an Long result.
- Version:
- $Id: LongAggregator.java 2265 2009-10-26 12:51:06Z thompsonbry $
- Author:
- Bryan Thompson
|
Method Summary |
void |
aggregate(Long result,
Split split)
Method is invoked for each result and is responsible for combining
the results in whatever manner is meaningful for the procedure. |
Long |
getResult()
Return the aggregated results as an implementation dependent object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LongAggregator
public LongAggregator()
aggregate
public void aggregate(Long result,
Split split)
- Description copied from interface:
IResultHandler
- Method is invoked for each result and is responsible for combining
the results in whatever manner is meaningful for the procedure.
Implementations of this method MUST be thread-safe
since the procedure MAY be applied in parallel when it spans more
than one index partition.
- Specified by:
aggregate in interface IResultHandler<Long,Long>
- Parameters:
result - The result from applying the procedure to a single index
partition.split - The Split that generated that result.- TODO:
- watch for overflow of
Long.MAX_VALUE
getResult
public Long getResult()
- Description copied from interface:
IResultHandler
- Return the aggregated results as an implementation dependent object.
- Specified by:
getResult in interface IResultHandler<Long,Long>
Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.