Module org.elasticsearch.server
Class InternalIpPrefix.Bucket
java.lang.Object
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucketWritable
org.elasticsearch.search.aggregations.bucket.prefix.InternalIpPrefix.Bucket
- All Implemented Interfaces:
Writeable,MultiBucketsAggregation.Bucket,IpPrefix.Bucket,HasAggregations,KeyComparable<InternalIpPrefix.Bucket>
- Enclosing class:
InternalIpPrefix
public static class InternalIpPrefix.Bucket
extends InternalMultiBucketAggregation.InternalBucketWritable
implements IpPrefix.Bucket, KeyComparable<InternalIpPrefix.Bucket>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionBucket(org.apache.lucene.util.BytesRef key, boolean isIpv6, int prefixLength, boolean appendPrefixLength, long docCount, InternalAggregations aggregations) Bucket(StreamInput in) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintCompare thisMultiBucketsAggregation.Bucketskeywith another bucket.booleanlongorg.apache.lucene.util.BytesRefgetKey()intinthashCode()booleanisIpv6()voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
getProperty
-
Constructor Details
-
Bucket
public Bucket(org.apache.lucene.util.BytesRef key, boolean isIpv6, int prefixLength, boolean appendPrefixLength, long docCount, InternalAggregations aggregations) -
Bucket
Read from a stream.- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getKey
public org.apache.lucene.util.BytesRef getKey()- Specified by:
getKeyin interfaceMultiBucketsAggregation.Bucket- Returns:
- The key associated with the bucket
-
getKeyAsString
- Specified by:
getKeyAsStringin interfaceMultiBucketsAggregation.Bucket- Returns:
- The key associated with the bucket as a string
-
isIpv6
public boolean isIpv6() -
getPrefixLength
public int getPrefixLength() -
appendPrefixLength
public boolean appendPrefixLength() -
getDocCount
public long getDocCount()- Specified by:
getDocCountin interfaceMultiBucketsAggregation.Bucket- Returns:
- The number of documents that fall within this bucket
-
getAggregations
- Specified by:
getAggregationsin interfaceHasAggregations- Specified by:
getAggregationsin interfaceMultiBucketsAggregation.Bucket- Returns:
- The sub-aggregations of this bucket
-
equals
-
hashCode
public int hashCode() -
compareKey
Description copied from interface:KeyComparableCompare thisMultiBucketsAggregation.Bucketskeywith another bucket.- Specified by:
compareKeyin interfaceKeyComparable<InternalIpPrefix.Bucket>- Parameters:
other- the bucket that contains the key to compare to.- Returns:
- a negative integer, zero, or a positive integer as this buckets key is less than, equal to, or greater than the other buckets key.
- See Also:
-