Class FixedMultiBucketAggregatorsReducer<B extends MultiBucketsAggregation.Bucket>

java.lang.Object
org.elasticsearch.search.aggregations.bucket.FixedMultiBucketAggregatorsReducer<B>
All Implemented Interfaces:
Closeable, AutoCloseable, Releasable

public abstract class FixedMultiBucketAggregatorsReducer<B extends MultiBucketsAggregation.Bucket> extends Object implements Releasable
Class for reducing many fixed lists of FixedMultiBucketAggregatorsReducer to a single reduced list.
  • Constructor Details

    • FixedMultiBucketAggregatorsReducer

      public FixedMultiBucketAggregatorsReducer(AggregationReduceContext reduceContext, int size, List<B> protoList)
  • Method Details

    • accept

      public final void accept(List<B> buckets)
      Adds a list of buckets for reduction. The size of the list must be the same as the size of the list passed on the constructor
    • get

      public final List<B> get()
      returns the reduced buckets.
    • createBucket

      protected abstract B createBucket(B proto, long focCount, InternalAggregations aggregations)
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface Releasable