Class MultiBucketConsumerService.MultiBucketConsumer

java.lang.Object
org.elasticsearch.search.aggregations.MultiBucketConsumerService.MultiBucketConsumer
All Implemented Interfaces:
java.util.function.IntConsumer
Enclosing class:
MultiBucketConsumerService

public static class MultiBucketConsumerService.MultiBucketConsumer
extends java.lang.Object
implements java.util.function.IntConsumer
An IntConsumer that throws a MultiBucketConsumerService.TooManyBucketsException when the sum of the provided values is above the limit (`search.max_buckets`). It is used by aggregators to limit the number of bucket creation during Aggregator.buildAggregations(long[]) and InternalAggregation.reduce(java.util.List<org.elasticsearch.search.aggregations.InternalAggregation>, org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext).
  • Constructor Summary

    Constructors
    Constructor Description
    MultiBucketConsumer​(int limit, CircuitBreaker breaker)  
  • Method Summary

    Modifier and Type Method Description
    void accept​(int value)  
    int getCount()  
    int getLimit()  
    void reset()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.function.IntConsumer

    andThen
  • Constructor Details

    • MultiBucketConsumer

      public MultiBucketConsumer​(int limit, CircuitBreaker breaker)
  • Method Details

    • accept

      public void accept​(int value)
      Specified by:
      accept in interface java.util.function.IntConsumer
    • reset

      public void reset()
    • getCount

      public int getCount()
    • getLimit

      public int getLimit()