Class InternalOrder.Streams
- java.lang.Object
-
- org.elasticsearch.search.aggregations.InternalOrder.Streams
-
- Enclosing class:
- InternalOrder
public static class InternalOrder.Streams extends java.lang.ObjectContains logic for reading/writingBucketOrderfrom/to streams.
-
-
Constructor Summary
Constructors Constructor Description Streams()
-
Method Summary
Modifier and Type Method Description static BucketOrderreadHistogramOrder(StreamInput in, boolean bwcOrderFlag)ONLY FOR HISTOGRAM ORDER: Backwards compatibility logic to read aBucketOrderfrom aStreamInput.static BucketOrderreadOrder(StreamInput in)Read aBucketOrderfrom aStreamInput.static voidwriteHistogramOrder(BucketOrder order, StreamOutput out, boolean bwcOrderFlag)ONLY FOR HISTOGRAM ORDER: Backwards compatibility logic to write aBucketOrderto a stream.static voidwriteOrder(BucketOrder order, StreamOutput out)Write aBucketOrderto aStreamOutput.
-
-
-
Method Detail
-
readOrder
public static BucketOrder readOrder(StreamInput in) throws java.io.IOException
Read aBucketOrderfrom aStreamInput.- Parameters:
in- stream with order data to read.- Returns:
- order read from the stream
- Throws:
java.io.IOException- on error reading from the stream.
-
readHistogramOrder
public static BucketOrder readHistogramOrder(StreamInput in, boolean bwcOrderFlag) throws java.io.IOException
ONLY FOR HISTOGRAM ORDER: Backwards compatibility logic to read aBucketOrderfrom aStreamInput.- Parameters:
in- stream with order data to read.bwcOrderFlag-trueto checkin.readBoolean()in the backwards compat logic before reading the order.falseto skip this flag (order always present).- Returns:
- order read from the stream
- Throws:
java.io.IOException- on error reading from the stream.
-
writeOrder
public static void writeOrder(BucketOrder order, StreamOutput out) throws java.io.IOException
Write aBucketOrderto aStreamOutput.- Parameters:
order- order to write to the stream.out- stream to write the order to.- Throws:
java.io.IOException- on error writing to the stream.
-
writeHistogramOrder
public static void writeHistogramOrder(BucketOrder order, StreamOutput out, boolean bwcOrderFlag) throws java.io.IOException
ONLY FOR HISTOGRAM ORDER: Backwards compatibility logic to write aBucketOrderto a stream.- Parameters:
order- order to write to the stream.out- stream to write the order to.bwcOrderFlag-trueto alwaysout.writeBoolean(true)for the backwards compat logic before writing the order.falseto skip this flag.- Throws:
java.io.IOException- on error writing to the stream.
-
-