当前位置: 首页>>代码示例>>Java>>正文


Java StreamInput.readBoolean方法代码示例

本文整理汇总了Java中org.elasticsearch.common.io.stream.StreamInput.readBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java StreamInput.readBoolean方法的具体用法?Java StreamInput.readBoolean怎么用?Java StreamInput.readBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.elasticsearch.common.io.stream.StreamInput的用法示例。


在下文中一共展示了StreamInput.readBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    int size = in.readVInt();
    items = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        int slot = in.readVInt();
        if (in.readBoolean()) {
            PercolateShardResponse shardResponse = new PercolateShardResponse();
            shardResponse.readFrom(in);
            items.add(new Item(slot, shardResponse));
        } else {
            items.add(new Item(slot, (Throwable)in.readThrowable()));
        }
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:17,代码来源:TransportShardMultiPercolateAction.java

示例2: 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);
    failures = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        locations.add(in.readVInt());
        if (in.readBoolean()) {
            failures.add(Failure.readFailure(in));
        } else {
            failures.add(null);
        }
    }
    if (in.readBoolean()) {
        failure = in.readThrowable();
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:19,代码来源:ShardResponse.java

示例3: 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();
    version = in.readLong();
    exists = in.readBoolean();
    if (exists) {
        source = in.readBytesReference();
        if (source.length() == 0) {
            source = null;
        }
        int size = in.readVInt();
        if (size == 0) {
            fields = ImmutableMap.of();
        } else {
            fields = newHashMapWithExpectedSize(size);
            for (int i = 0; i < size; i++) {
                GetField field = readGetField(in);
                fields.put(field.getName(), field);
            }
        }
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:25,代码来源:GetResult.java

示例4: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    type = in.readString();
    id = in.readString();
    routing = in.readOptionalString();
    preference = in.readOptionalString();
    source = in.readBytesReference();
    filteringAlias = in.readStringArray();
    if (in.readBoolean()) {
        fields = in.readStringArray();
    }

    fetchSourceContext = FetchSourceContext.optionalReadFromStream(in);
    nowInMillis = in.readVLong();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:17,代码来源:ExplainRequest.java

示例5: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public AliasMetaData readFrom(StreamInput in) throws IOException {
    String alias = in.readString();
    CompressedXContent filter = null;
    if (in.readBoolean()) {
        filter = CompressedXContent.readCompressedString(in);
    }
    String indexRouting = null;
    if (in.readBoolean()) {
        indexRouting = in.readString();
    }
    String searchRouting = null;
    if (in.readBoolean()) {
        searchRouting = in.readString();
    }
    return new AliasMetaData(alias, filter, indexRouting, searchRouting);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:18,代码来源:AliasMetaData.java

示例6: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    cause = in.readString();
    index = in.readString();
    settings = readSettingsFromStream(in);
    readTimeout(in);
    int size = in.readVInt();
    for (int i = 0; i < size; i++) {
        mappings.put(in.readString(), in.readString());
    }
    int customSize = in.readVInt();
    for (int i = 0; i < customSize; i++) {
        String type = in.readString();
        IndexMetaData.Custom customIndexMetaData = IndexMetaData.lookupPrototypeSafe(type).readFrom(in);
        customs.put(type, customIndexMetaData);
    }
    int aliasesSize = in.readVInt();
    for (int i = 0; i < aliasesSize; i++) {
        aliases.add(Alias.read(in));
    }
    updateAllTypes = in.readBoolean();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:24,代码来源:CreateIndexRequest.java

示例7: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    request = in.readOptionalStreamable(SearchRequest::new);
    simulate = in.readBoolean();
    explain = in.readBoolean();
    profile = in.readBoolean();
    scriptType = ScriptType.readFrom(in);
    script = in.readOptionalString();
    if (in.readBoolean()) {
        scriptParams = in.readMap();
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:SearchTemplateRequest.java

示例8: 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;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:17,代码来源:InternalRange.java

示例9: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    repository = in.readString();
    snapshots = in.readStringArray();
    ignoreUnavailable = in.readBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:GetSnapshotsRequest.java

示例10: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    valid = in.readBoolean();
    int size = in.readVInt();
    if (size == 0) {
        failures = Collections.emptyList();
    } else {
        failures = new ArrayList<>(size);
        for (int i = 0; i < size; i++) {
            failures.add(in.readString());
        }
    }
    size = in.readVInt();
    if (size == 0) {
        indicesFailures = ImmutableMap.of();
    } else {
        indicesFailures = newHashMap();
        for (int i = 0; i < size; i++) {
            String index = in.readString();
            int size2 = in.readVInt();
            List<String> indexFailures = new ArrayList<>(size2);
            for (int j = 0; j < size2; j++) {
                indexFailures.add(in.readString());
            }
            indicesFailures.put(index, indexFailures);
        }
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:29,代码来源:RoutingTableValidation.java

示例11: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    valid = in.readBoolean();
    int size = in.readVInt();
    if (size > 0) {
        queryExplanations = new ArrayList<>(size);
        for (int i = 0; i < size; i++) {
            queryExplanations.add(readQueryExplanation(in));
        }
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:13,代码来源:ValidateQueryResponse.java

示例12: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    clusterName = new ClusterName(in);
    node = new DiscoveryNode(in);
    if (in.readBoolean()) {
        master = new DiscoveryNode(in);
    }
    this.clusterStateVersion = in.readLong();
    this.id = in.readLong();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:ZenPing.java

示例13: ScriptedMetricAggregationBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public ScriptedMetricAggregationBuilder(StreamInput in) throws IOException {
    super(in);
    initScript = in.readOptionalWriteable(Script::new);
    mapScript = in.readOptionalWriteable(Script::new);
    combineScript = in.readOptionalWriteable(Script::new);
    reduceScript = in.readOptionalWriteable(Script::new);
    if (in.readBoolean()) {
        params = in.readMap();
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:ScriptedMetricAggregationBuilder.java

示例14: AllocateUnassignedDecision

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public AllocateUnassignedDecision(StreamInput in) throws IOException {
    super(in);
    allocationStatus = in.readOptionalWriteable(AllocationStatus::readFrom);
    allocationId = in.readOptionalString();
    reuseStore = in.readBoolean();
    remainingDelayInMillis = in.readVLong();
    configuredDelayInMillis = in.readVLong();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:AllocateUnassignedDecision.java

示例15: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    scrollId = in.readString();
    if (in.readBoolean()) {
        scroll = readScroll(in);
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:9,代码来源:SearchScrollRequest.java


注:本文中的org.elasticsearch.common.io.stream.StreamInput.readBoolean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。