Package io.activej.aggregation
Class AggregationGroupReducer<C,T,K extends Comparable>
java.lang.Object
io.activej.datastream.AbstractStreamConsumer<T>
io.activej.aggregation.AggregationGroupReducer<C,T,K>
- All Implemented Interfaces:
io.activej.async.process.AsyncCloseable,StreamConsumer<T>,StreamDataAcceptor<T>
public final class AggregationGroupReducer<C,T,K extends Comparable>
extends AbstractStreamConsumer<T>
implements StreamDataAcceptor<T>
-
Field Summary
Fields inherited from class io.activej.datastream.AbstractStreamConsumer
eventloopFields inherited from interface io.activej.async.process.AsyncCloseable
STATIC -
Constructor Summary
ConstructorsConstructorDescriptionAggregationGroupReducer(@NotNull AggregationChunkStorage<C> storage, @NotNull AggregationStructure aggregation, @NotNull List<String> measures, @NotNull Class<T> recordClass, @NotNull PartitionPredicate<T> partitionPredicate, @NotNull Function<T, K> keyFunction, @NotNull Aggregate<T, Object> aggregate, int chunkSize, @NotNull DefiningClassLoader classLoader) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidflush()intio.activej.promise.Promise<List<AggregationChunk>>protected voidprotected voidprotected voidtoString()Methods inherited from class io.activej.datastream.AbstractStreamConsumer
acknowledge, closeEx, consume, getAcknowledgement, getDataAcceptor, getSupplier, isEndOfStream, isStarted, onCleanup, onComplete, onInit, resume, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.activej.async.process.AsyncCloseable
closeMethods inherited from interface io.activej.datastream.StreamConsumer
isComplete, isException, isResult, transformWith, withAcknowledgement
-
Constructor Details
-
AggregationGroupReducer
public AggregationGroupReducer(@NotNull @NotNull AggregationChunkStorage<C> storage, @NotNull @NotNull AggregationStructure aggregation, @NotNull @NotNull List<String> measures, @NotNull @NotNull Class<T> recordClass, @NotNull @NotNull PartitionPredicate<T> partitionPredicate, @NotNull @NotNull Function<T, K> keyFunction, @NotNull @NotNull Aggregate<T, Object> aggregate, int chunkSize, @NotNull @NotNull DefiningClassLoader classLoader)
-
-
Method Details
-
getResult
-
accept
- Specified by:
acceptin interfaceStreamDataAcceptor<C>
-
onStarted
protected void onStarted()- Overrides:
onStartedin classAbstractStreamConsumer<T>
-
onEndOfStream
protected void onEndOfStream()- Overrides:
onEndOfStreamin classAbstractStreamConsumer<T>
-
onError
- Overrides:
onErrorin classAbstractStreamConsumer<T>
-
flush
public void flush() -
getBufferSize
public int getBufferSize() -
toString
-