/** * Read an aggregation from a stream that does not serialize its targetValueType. This should be used by most subclasses. */ protected ValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType, ValueType targetValueType) throws IOException { super(in); assert false == serializeTargetValueType() : "Wrong read constructor called for subclass that provides its targetValueType"; this.valuesSourceType = valuesSourceType; this.targetValueType = targetValueType; read(in); }
/** * Read an aggregation from a stream that serializes its targetValueType. This should only be used by subclasses that override * {@link #serializeTargetValueType()} to return true. */ protected ValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType) throws IOException { super(in); assert serializeTargetValueType() : "Wrong read constructor called for subclass that serializes its targetValueType"; this.valuesSourceType = valuesSourceType; this.targetValueType = in.readOptionalWriteable(ValueType::readFromStream); read(in); }
@Override protected final void doWriteTo(StreamOutput out) throws IOException { if (serializeTargetValueType()) { out.writeOptionalWriteable(targetValueType); } out.writeOptionalString(field); boolean hasScript = script != null; out.writeBoolean(hasScript); if (hasScript) { script.writeTo(out); } boolean hasValueType = valueType != null; out.writeBoolean(hasValueType); if (hasValueType) { valueType.writeTo(out); } out.writeOptionalString(format); out.writeGenericValue(missing); boolean hasTimeZone = timeZone != null; out.writeBoolean(hasTimeZone); if (hasTimeZone) { out.writeString(timeZone.getID()); } innerWriteTo(out); }
/** * Read an aggregation from a stream that does not serialize its targetValueType. This should be used by most subclasses. */ protected ValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType, ValueType targetValueType) throws IOException { super(in); assert false == serializeTargetValueType() : "Wrong read constructor called for subclass that provides its targetValueType"; this.valuesSourceType = valuesSourceType; this.targetValueType = targetValueType; read(in); }
/** * Read an aggregation from a stream that does not serialize its targetValueType. This should be used by most subclasses. */ protected ValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType, ValueType targetValueType) throws IOException { super(in); assert false == serializeTargetValueType() : "Wrong read constructor called for subclass that provides its targetValueType"; this.valuesSourceType = valuesSourceType; this.targetValueType = targetValueType; read(in); }
/** * Read an aggregation from a stream that does not serialize its targetValueType. This should be used by most subclasses. */ protected ValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType, ValueType targetValueType) throws IOException { super(in); assert false == serializeTargetValueType() : "Wrong read constructor called for subclass that provides its targetValueType"; this.valuesSourceType = valuesSourceType; this.targetValueType = targetValueType; read(in); }
/** * Read an aggregation from a stream that serializes its targetValueType. This should only be used by subclasses that override * {@link #serializeTargetValueType()} to return true. */ protected ValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType) throws IOException { super(in); assert serializeTargetValueType() : "Wrong read constructor called for subclass that serializes its targetValueType"; this.valuesSourceType = valuesSourceType; this.targetValueType = in.readOptionalWriteable(ValueType::readFromStream); read(in); }
/** * Read an aggregation from a stream that serializes its targetValueType. This should only be used by subclasses that override * {@link #serializeTargetValueType()} to return true. */ protected ValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType) throws IOException { super(in); assert serializeTargetValueType() : "Wrong read constructor called for subclass that serializes its targetValueType"; this.valuesSourceType = valuesSourceType; this.targetValueType = in.readOptionalWriteable(ValueType::readFromStream); read(in); }
/** * Read an aggregation from a stream that serializes its targetValueType. This should only be used by subclasses that override * {@link #serializeTargetValueType()} to return true. */ protected ValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType) throws IOException { super(in); assert serializeTargetValueType() : "Wrong read constructor called for subclass that serializes its targetValueType"; this.valuesSourceType = valuesSourceType; this.targetValueType = in.readOptionalWriteable(ValueType::readFromStream); read(in); }
@Override protected final void doWriteTo(StreamOutput out) throws IOException { if (serializeTargetValueType()) { out.writeOptionalWriteable(targetValueType); } out.writeOptionalString(field); boolean hasScript = script != null; out.writeBoolean(hasScript); if (hasScript) { script.writeTo(out); } boolean hasValueType = valueType != null; out.writeBoolean(hasValueType); if (hasValueType) { valueType.writeTo(out); } out.writeOptionalString(format); out.writeGenericValue(missing); boolean hasTimeZone = timeZone != null; out.writeBoolean(hasTimeZone); if (hasTimeZone) { out.writeString(timeZone.getID()); } innerWriteTo(out); }
@Override protected final void doWriteTo(StreamOutput out) throws IOException { if (serializeTargetValueType()) { out.writeOptionalWriteable(targetValueType); } out.writeOptionalString(field); boolean hasScript = script != null; out.writeBoolean(hasScript); if (hasScript) { script.writeTo(out); } boolean hasValueType = valueType != null; out.writeBoolean(hasValueType); if (hasValueType) { valueType.writeTo(out); } out.writeOptionalString(format); out.writeGenericValue(missing); boolean hasTimeZone = timeZone != null; out.writeBoolean(hasTimeZone); if (hasTimeZone) { out.writeString(timeZone.getID()); } innerWriteTo(out); }
@Override protected final void doWriteTo(StreamOutput out) throws IOException { if (serializeTargetValueType()) { out.writeOptionalWriteable(targetValueType); } out.writeOptionalString(field); boolean hasScript = script != null; out.writeBoolean(hasScript); if (hasScript) { script.writeTo(out); } boolean hasValueType = valueType != null; out.writeBoolean(hasValueType); if (hasValueType) { valueType.writeTo(out); } out.writeOptionalString(format); out.writeGenericValue(missing); boolean hasTimeZone = timeZone != null; out.writeBoolean(hasTimeZone); if (hasTimeZone) { out.writeString(timeZone.getID()); } innerWriteTo(out); }