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


Java StreamInput.readMap方法代码示例

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


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

示例1: JvmInfo

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public JvmInfo(StreamInput in) throws IOException {
    pid = in.readLong();
    version = in.readString();
    vmName = in.readString();
    vmVersion = in.readString();
    vmVendor = in.readString();
    startTime = in.readLong();
    inputArguments = new String[in.readInt()];
    for (int i = 0; i < inputArguments.length; i++) {
        inputArguments[i] = in.readString();
    }
    bootClassPath = in.readString();
    classPath = in.readString();
    systemProperties = in.readMap(StreamInput::readString, StreamInput::readString);
    mem = new Mem(in);
    gcCollectors = in.readStringArray();
    memoryPools = in.readStringArray();
    useCompressedOops = in.readString();
    //the following members are only used locally for bootstrap checks, never serialized nor printed out
    this.configuredMaxHeapSize = -1;
    this.configuredInitialHeapSize = -1;
    this.onError = null;
    this.onOutOfMemoryError = null;
    this.useG1GC = "unknown";
    this.useSerialGC = "unknown";
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:27,代码来源:JvmInfo.java

示例2: 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

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

示例4: StoredScriptSource

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Reads a {@link StoredScriptSource} from a stream.  Version 5.3+ will read
 * all of the lang, code, and options parameters.  For versions prior to 5.3,
 * only the code parameter will be read in as a bytes reference.
 */
public StoredScriptSource(StreamInput in) throws IOException {
    if (in.getVersion().onOrAfter(Version.V_5_3_0_UNRELEASED)) {
        this.lang = in.readString();
        this.code = in.readString();
        @SuppressWarnings("unchecked")
        Map<String, String> options = (Map<String, String>)(Map)in.readMap();
        this.options = options;
    } else {
        this.lang = null;
        this.code = in.readBytesReference().utf8ToString();
        this.options = null;
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:19,代码来源:StoredScriptSource.java

示例5: 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

示例6: PhraseSuggestionBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public PhraseSuggestionBuilder(StreamInput in) throws IOException {
    super(in);
    maxErrors = in.readFloat();
    realWordErrorLikelihood = in.readFloat();
    confidence = in.readFloat();
    gramSize = in.readOptionalVInt();
    model = in.readOptionalNamedWriteable(SmoothingModel.class);
    forceUnigrams = in.readBoolean();
    tokenLimit = in.readVInt();
    preTag = in.readOptionalString();
    postTag = in.readOptionalString();
    separator = in.readString();
    if (in.readBoolean()) {
        collateQuery = new Script(in);
    }
    collateParams = in.readMap();
    collatePrune = in.readOptionalBoolean();
    int generatorsEntries = in.readVInt();
    for (int i = 0; i < generatorsEntries; i++) {
        String type = in.readString();
        int numberOfGenerators = in.readVInt();
        List<CandidateGenerator> generatorsList = new ArrayList<>(numberOfGenerators);
        for (int g = 0; g < numberOfGenerators; g++) {
            DirectCandidateGeneratorBuilder generator = new DirectCandidateGeneratorBuilder(in);
            generatorsList.add(generator);
        }
        generators.put(type, generatorsList);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:33,代码来源:PhraseSuggestionBuilder.java

示例7: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    totalStats = Stats.readStats(in);
    openContexts = in.readVLong();
    if (in.readBoolean()) {
        groupStats = in.readMap(StreamInput::readString, Stats::readStats);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:SearchStats.java

示例8: readFrom

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

示例9: ClusterInfo

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public ClusterInfo(StreamInput in) throws IOException {
    Map<String, DiskUsage> leastMap = in.readMap(StreamInput::readString, DiskUsage::new);
    Map<String, DiskUsage> mostMap = in.readMap(StreamInput::readString, DiskUsage::new);
    Map<String, Long> sizeMap = in.readMap(StreamInput::readString, StreamInput::readLong);
    Map<ShardRouting, String> routingMap = in.readMap(ShardRouting::new, StreamInput::readString);

    ImmutableOpenMap.Builder<String, DiskUsage> leastBuilder = ImmutableOpenMap.builder();
    this.leastAvailableSpaceUsage = leastBuilder.putAll(leastMap).build();
    ImmutableOpenMap.Builder<String, DiskUsage> mostBuilder = ImmutableOpenMap.builder();
    this.mostAvailableSpaceUsage = mostBuilder.putAll(mostMap).build();
    ImmutableOpenMap.Builder<String, Long> sizeBuilder = ImmutableOpenMap.builder();
    this.shardSizes = sizeBuilder.putAll(sizeMap).build();
    ImmutableOpenMap.Builder<ShardRouting, String> routingBuilder = ImmutableOpenMap.builder();
    this.routingToDataPath = routingBuilder.putAll(routingMap).build();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:16,代码来源:ClusterInfo.java

示例10: 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();
}
 
开发者ID:scaleborn,项目名称:elasticsearch-linear-regression,代码行数:11,代码来源:MultiValuesSourceAggregationBuilder.java

示例11: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public final void readFrom(StreamInput in) throws IOException {
    script = in.readString();
    if (in.readBoolean()) {
        type = ScriptType.readFrom(in);
    }
    lang = in.readOptionalString();
    if (in.readBoolean()) {
        params = in.readMap();
    }
    doReadFrom(in);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:13,代码来源:Script.java

示例12: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public final void readFrom(StreamInput in) throws IOException {
    name = in.readString();
    bucketsPaths = in.readStringArray();
    metaData = in.readMap();
    doReadFrom(in);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:PipelineAggregator.java

示例13: AbstractAggregationBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
protected AbstractAggregationBuilder(StreamInput in) throws IOException {
    super(in.readString());
    factoriesBuilder = new AggregatorFactories.Builder(in);
    metaData = in.readMap();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:AbstractAggregationBuilder.java

示例14: PipelineAggregator

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
protected PipelineAggregator(StreamInput in) throws IOException {
    name = in.readString();
    bucketsPaths = in.readStringArray();
    metaData = in.readMap();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:PipelineAggregator.java

示例15: AbstractPipelineAggregationBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
protected AbstractPipelineAggregationBuilder(StreamInput in, String type) throws IOException {
    this(in.readString(), type, in.readStringArray());
    metaData = in.readMap();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:AbstractPipelineAggregationBuilder.java


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