當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。