本文整理匯總了Java中org.elasticsearch.common.io.stream.StreamInput.readNamedWriteable方法的典型用法代碼示例。如果您正苦於以下問題:Java StreamInput.readNamedWriteable方法的具體用法?Java StreamInput.readNamedWriteable怎麽用?Java StreamInput.readNamedWriteable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.elasticsearch.common.io.stream.StreamInput
的用法示例。
在下文中一共展示了StreamInput.readNamedWriteable方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
query = in.readNamedWriteable(QueryBuilder.class);
int typesSize = in.readVInt();
if (typesSize > 0) {
types = new String[typesSize];
for (int i = 0; i < typesSize; i++) {
types[i] = in.readString();
}
}
filteringAliases = new AliasFilter(in);
explain = in.readBoolean();
rewrite = in.readBoolean();
nowInMillis = in.readVLong();
}
示例2: FunctionScoreQueryBuilder
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
* Read from a stream.
*/
public FunctionScoreQueryBuilder(StreamInput in) throws IOException {
super(in);
query = in.readNamedWriteable(QueryBuilder.class);
filterFunctionBuilders = in.readList(FilterFunctionBuilder::new).toArray(new FilterFunctionBuilder[0]);
maxBoost = in.readFloat();
minScore = in.readOptionalFloat();
boostMode = in.readOptionalWriteable(CombineFunction::readFromStream);
scoreMode = FiltersFunctionScoreQuery.ScoreMode.readFromStream(in);
}
示例3: InternalHistogram
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
* Stream from a stream.
*/
public InternalHistogram(StreamInput in) throws IOException {
super(in);
order = InternalOrder.Streams.readOrder(in);
minDocCount = in.readVLong();
if (minDocCount == 0) {
emptyBucketInfo = new EmptyBucketInfo(in);
} else {
emptyBucketInfo = null;
}
format = in.readNamedWriteable(DocValueFormat.class);
keyed = in.readBoolean();
buckets = in.readList(stream -> new Bucket(stream, keyed, format));
}
示例4: InternalAvg
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
* Read from a stream.
*/
public InternalAvg(StreamInput in) throws IOException {
super(in);
format = in.readNamedWriteable(DocValueFormat.class);
sum = in.readDouble();
count = in.readVLong();
}
示例5: InternalRange
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
* Read from a stream.
*/
public InternalRange(StreamInput in) throws IOException {
super(in);
format = in.readNamedWriteable(DocValueFormat.class);
keyed = in.readBoolean();
int size = in.readVInt();
List<B> ranges = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
String key = in.readOptionalString();
ranges.add(getFactory().createBucket(key, in.readDouble(), in.readDouble(), in.readVLong(),
InternalAggregations.readAggregations(in), keyed, format));
}
this.ranges = ranges;
}
示例6: marshal
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
* Since custom metadata can be loaded by a plugin class loader that resides in a sub-node, we need to
* marshal this object into something the tribe node can work with
*/
private MetaData.Custom marshal(MetaData.Custom custom) {
try (BytesStreamOutput bytesStreamOutput = new BytesStreamOutput()){
bytesStreamOutput.writeNamedWriteable(custom);
try(StreamInput input = bytesStreamOutput.bytes().streamInput()) {
StreamInput namedInput = new NamedWriteableAwareStreamInput(input, namedWriteableRegistry);
MetaData.Custom marshaled = namedInput.readNamedWriteable(MetaData.Custom.class);
return marshaled;
}
} catch (IOException ex) {
throw new IllegalStateException("cannot marshal object with type " + custom.getWriteableName() + " to tribe node");
}
}
示例7: MovAvgPipelineAggregationBuilder
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
* Read from a stream.
*/
public MovAvgPipelineAggregationBuilder(StreamInput in) throws IOException {
super(in, NAME);
format = in.readOptionalString();
gapPolicy = GapPolicy.readFrom(in);
window = in.readVInt();
model = in.readNamedWriteable(MovAvgModel.class);
predict = in.readVInt();
minimize = in.readOptionalBoolean();
}
示例8: NestedQueryBuilder
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
* Read from a stream.
*/
public NestedQueryBuilder(StreamInput in) throws IOException {
super(in);
path = in.readString();
scoreMode = ScoreMode.values()[in.readVInt()];
query = in.readNamedWriteable(QueryBuilder.class);
innerHitBuilder = in.readOptionalWriteable(InnerHitBuilder::new);
ignoreUnmapped = in.readBoolean();
}
示例9: InternalBucketMetricValue
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
* Read from a stream.
*/
public InternalBucketMetricValue(StreamInput in) throws IOException {
super(in);
format = in.readNamedWriteable(DocValueFormat.class);
value = in.readDouble();
keys = in.readStringArray();
}
示例10: HasParentQueryBuilder
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
* Read from a stream.
*/
public HasParentQueryBuilder(StreamInput in) throws IOException {
super(in);
type = in.readString();
score = in.readBoolean();
query = in.readNamedWriteable(QueryBuilder.class);
innerHit = in.readOptionalWriteable(InnerHitBuilder::new);
ignoreUnmapped = in.readBoolean();
}
示例11: BucketScriptPipelineAggregator
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
* Read from a stream.
*/
@SuppressWarnings("unchecked")
public BucketScriptPipelineAggregator(StreamInput in) throws IOException {
super(in);
script = new Script(in);
formatter = in.readNamedWriteable(DocValueFormat.class);
gapPolicy = GapPolicy.readFrom(in);
bucketsPathsMap = (Map<String, String>) in.readGenericValue();
}
示例12: InternalMappedSignificantTerms
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
protected InternalMappedSignificantTerms(StreamInput in, Bucket.Reader<B> bucketReader) throws IOException {
super(in);
format = in.readNamedWriteable(DocValueFormat.class);
subsetSize = in.readVLong();
supersetSize = in.readVLong();
significanceHeuristic = in.readNamedWriteable(SignificanceHeuristic.class);
buckets = in.readList(stream -> bucketReader.read(stream, subsetSize, supersetSize, format));
}
示例13: InternalHyperUniqueSum
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
public InternalHyperUniqueSum(StreamInput in) throws IOException {
super(in);
format = in.readNamedWriteable(DocValueFormat.class);
hyperLogLogPlusBytes = in.readByteArray();
}
示例14: FilterFunctionBuilder
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
* Read from a stream.
*/
public FilterFunctionBuilder(StreamInput in) throws IOException {
filter = in.readNamedWriteable(QueryBuilder.class);
scoreFunction = in.readNamedWriteable(ScoreFunctionBuilder.class);
}
示例15: InternalMin
import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
* Read from a stream.
*/
public InternalMin(StreamInput in) throws IOException {
super(in);
format = in.readNamedWriteable(DocValueFormat.class);
min = in.readDouble();
}