本文整理汇总了Java中org.elasticsearch.common.io.stream.StreamInput.readOptionalString方法的典型用法代码示例。如果您正苦于以下问题:Java StreamInput.readOptionalString方法的具体用法?Java StreamInput.readOptionalString怎么用?Java StreamInput.readOptionalString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.common.io.stream.StreamInput
的用法示例。
在下文中一共展示了StreamInput.readOptionalString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MappingMetaData
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public MappingMetaData(StreamInput in) throws IOException {
type = in.readString();
source = CompressedXContent.readCompressedString(in);
// routing
routing = new Routing(in.readBoolean());
if (in.getVersion().before(Version.V_6_0_0_alpha1_UNRELEASED)) {
// timestamp
boolean enabled = in.readBoolean();
if (enabled) {
throw new IllegalArgumentException("_timestamp may not be enabled");
}
in.readString(); // format
in.readOptionalString(); // defaultTimestamp
in.readOptionalBoolean(); // ignoreMissing
}
hasParentField = in.readBoolean();
}
示例2: Bucket
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
private Bucket(StreamInput in, DocValueFormat format, boolean keyed) throws IOException {
this.format = format;
this.keyed = keyed;
key = in.readOptionalString();
if (in.readBoolean()) {
from = in.readBytesRef();
} else {
from = null;
}
if (in.readBoolean()) {
to = in.readBytesRef();
} else {
to = null;
}
docCount = in.readLong();
aggregations = InternalAggregations.readAggregations(in);
}
示例3: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
this.pipelineId = in.readOptionalString();
boolean verbose = in.readBoolean();
int responsesLength = in.readVInt();
results = new ArrayList<>();
for (int i = 0; i < responsesLength; i++) {
SimulateDocumentResult simulateDocumentResult;
if (verbose) {
simulateDocumentResult = new SimulateDocumentVerboseResult(in);
} else {
simulateDocumentResult = new SimulateDocumentBaseResult(in);
}
results.add(simulateDocumentResult);
}
}
示例4: DerivativePipelineAggregationBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public DerivativePipelineAggregationBuilder(StreamInput in) throws IOException {
super(in, NAME);
format = in.readOptionalString();
if (in.readBoolean()) {
gapPolicy = GapPolicy.readFrom(in);
}
units = in.readOptionalString();
}
示例5: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
startTime = in.readVLong();
documentType = in.readString();
routing = in.readOptionalString();
preference = in.readOptionalString();
source = in.readBytesReference();
docSource = in.readBytesReference();
if (in.readBoolean()) {
getRequest = new GetRequest(null);
getRequest.readFrom(in);
}
onlyCount = in.readBoolean();
}
示例6: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
index = in.readString();
type = in.readOptionalString();
id = in.readString();
throwable = in.readThrowable();
}
示例7: read
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
@SuppressWarnings("unchecked")
private void read(StreamInput in) throws IOException {
fields = (ArrayList<String>)in.readGenericValue();
valueType = in.readOptionalWriteable(ValueType::readFromStream);
format = in.readOptionalString();
missingMap = in.readMap();
}
示例8: SnapshotInfo
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Constructs snapshot information from stream input
*/
public SnapshotInfo(final StreamInput in) throws IOException {
snapshotId = new SnapshotId(in);
int size = in.readVInt();
List<String> indicesListBuilder = new ArrayList<>();
for (int i = 0; i < size; i++) {
indicesListBuilder.add(in.readString());
}
indices = Collections.unmodifiableList(indicesListBuilder);
state = SnapshotState.fromValue(in.readByte());
reason = in.readOptionalString();
startTime = in.readVLong();
endTime = in.readVLong();
totalShards = in.readVInt();
successfulShards = in.readVInt();
size = in.readVInt();
if (size > 0) {
List<SnapshotShardFailure> failureBuilder = new ArrayList<>();
for (int i = 0; i < size; i++) {
failureBuilder.add(SnapshotShardFailure.readSnapshotShardFailure(in));
}
shardFailures = Collections.unmodifiableList(failureBuilder);
} else {
shardFailures = Collections.emptyList();
}
if (in.getVersion().before(VERSION_INCOMPATIBLE_INTRODUCED)) {
version = Version.readVersion(in);
} else {
version = in.readBoolean() ? Version.readVersion(in) : null;
}
}
示例9: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
type = in.readOptionalString();
source = in.readString();
if (in.getVersion().before(Version.V_6_0_0_alpha1_UNRELEASED)) { // TODO change to V_5_3 once backported
// we do not know the format from earlier versions so convert if necessary
source = XContentHelper.convertToJson(new BytesArray(source), false, false, XContentFactory.xContentType(source));
}
updateAllTypes = in.readBoolean();
readTimeout(in);
concreteIndex = in.readOptionalWriteable(Index::new);
}
示例10: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int size = in.readVInt();
locations = new IntArrayList(size);
requests = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
locations.add(in.readVInt());
requests.add(TermVectorsRequest.readTermVectorsRequest(in));
}
preference = in.readOptionalString();
}
示例11: WildcardQueryBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public WildcardQueryBuilder(StreamInput in) throws IOException {
super(in);
fieldName = in.readString();
value = in.readString();
rewrite = in.readOptionalString();
}
示例12: MatchPhrasePrefixQueryBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public MatchPhrasePrefixQueryBuilder(StreamInput in) throws IOException {
super(in);
fieldName = in.readString();
value = in.readGenericValue();
slop = in.readVInt();
maxExpansions = in.readVInt();
analyzer = in.readOptionalString();
}
示例13: DiversifiedAggregationBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public DiversifiedAggregationBuilder(StreamInput in) throws IOException {
super(in, ValuesSourceType.ANY, null);
shardSize = in.readVInt();
maxDocsPerValue = in.readVInt();
executionHint = in.readOptionalString();
}
示例14: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
index = in.readString();
shardId = in.readVInt();
nodeId = in.readOptionalString();
cause = in.readThrowable();
status = RestStatus.readFrom(in);
primary = in.readBoolean();
}
示例15: ScriptSortBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public ScriptSortBuilder(StreamInput in) throws IOException {
script = new Script(in);
type = ScriptSortType.readFromStream(in);
order = SortOrder.readFromStream(in);
sortMode = in.readOptionalWriteable(SortMode::readFromStream);
nestedPath = in.readOptionalString();
nestedFilter = in.readOptionalNamedWriteable(QueryBuilder.class);
}