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


Java StreamInput.readOptionalWriteable方法代码示例

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


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

示例1: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    version = Version.readVersion(in);
    build = Build.readBuild(in);
    if (in.readBoolean()) {
        totalIndexingBuffer = new ByteSizeValue(in.readLong());
    } else {
        totalIndexingBuffer = null;
    }
    if (in.readBoolean()) {
        settings = Settings.readSettingsFromStream(in);
    }
    os = in.readOptionalWriteable(OsInfo::new);
    process = in.readOptionalWriteable(ProcessInfo::new);
    jvm = in.readOptionalWriteable(JvmInfo::new);
    threadPool = in.readOptionalWriteable(ThreadPoolInfo::new);
    transport = in.readOptionalWriteable(TransportInfo::new);
    http = in.readOptionalWriteable(HttpInfo::new);
    plugins = in.readOptionalWriteable(PluginsAndModules::new);
    ingest = in.readOptionalWriteable(IngestInfo::new);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:23,代码来源:NodeInfo.java

示例2: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    searchType = SearchType.fromId(in.readByte());
    indices = new String[in.readVInt()];
    for (int i = 0; i < indices.length; i++) {
        indices[i] = in.readString();
    }
    routing = in.readOptionalString();
    preference = in.readOptionalString();
    scroll = in.readOptionalWriteable(Scroll::new);
    source = in.readOptionalWriteable(SearchSourceBuilder::new);
    types = in.readStringArray();
    indicesOptions = IndicesOptions.readIndicesOptions(in);
    requestCache = in.readOptionalBoolean();
    batchedReduceSize = in.readVInt();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:18,代码来源:SearchRequest.java

示例3: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    destination = new IndexRequest();
    destination.readFrom(in);
    remoteInfo = in.readOptionalWriteable(RemoteInfo::new);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:ReindexRequest.java

示例4: Info

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public Info(StreamInput in) throws IOException {
    name = in.readString();
    type = ThreadPoolType.fromType(in.readString());
    min = in.readInt();
    max = in.readInt();
    keepAlive = in.readOptionalWriteable(TimeValue::new);
    queueSize = in.readOptionalWriteable(SizeValue::new);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:ThreadPool.java

示例5: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    taskId = TaskId.readFromStream(in);
    timeout = in.readOptionalWriteable(TimeValue::new);
    waitForCompletion = in.readBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:GetTaskRequest.java

示例6: OsStats

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public OsStats(StreamInput in) throws IOException {
    this.timestamp = in.readVLong();
    this.cpu = new Cpu(in);
    this.mem = new Mem(in);
    this.swap = new Swap(in);
    if (in.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
        this.cgroup = in.readOptionalWriteable(Cgroup::new);
    } else {
        this.cgroup = null;
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:12,代码来源:OsStats.java

示例7: ProcessStats

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public ProcessStats(StreamInput in) throws IOException {
    timestamp = in.readVLong();
    openFileDescriptors = in.readLong();
    maxFileDescriptors = in.readLong();
    cpu = in.readOptionalWriteable(Cpu::new);
    mem = in.readOptionalWriteable(Mem::new);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:ProcessStats.java

示例8: ClusterAllocationExplanation

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public ClusterAllocationExplanation(StreamInput in) throws IOException {
    this.shardRouting = new ShardRouting(in);
    this.currentNode = in.readOptionalWriteable(DiscoveryNode::new);
    this.relocationTargetNode = in.readOptionalWriteable(DiscoveryNode::new);
    this.clusterInfo = in.readOptionalWriteable(ClusterInfo::new);
    this.shardAllocationDecision = new ShardAllocationDecision(in);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:ClusterAllocationExplanation.java

示例9: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    discoveryNode = in.readOptionalWriteable(DiscoveryNode::new);
    clusterName = new ClusterName(in);
    version = Version.readVersion(in);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:TransportService.java

示例10: readFromWithId

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public void readFromWithId(long id, StreamInput in) throws IOException {
    this.id = id;
    from = in.readVInt();
    size = in.readVInt();
    int numSortFieldsPlus1 = in.readVInt();
    if (numSortFieldsPlus1 == 0) {
        sortValueFormats = null;
    } else {
        sortValueFormats = new DocValueFormat[numSortFieldsPlus1 - 1];
        for (int i = 0; i < sortValueFormats.length; ++i) {
            sortValueFormats[i] = in.readNamedWriteable(DocValueFormat.class);
        }
    }
    topDocs = readTopDocs(in);
    if (hasAggs = in.readBoolean()) {
        aggregations = InternalAggregations.readAggregations(in);
    }
    pipelineAggregators = in.readNamedWriteableList(PipelineAggregator.class).stream().map(a -> (SiblingPipelineAggregator) a)
            .collect(Collectors.toList());
    if (in.readBoolean()) {
        suggest = Suggest.readSuggest(in);
    }
    searchTimedOut = in.readBoolean();
    terminatedEarly = in.readOptionalBoolean();
    profileShardResults = in.readOptionalWriteable(ProfileShardResult::new);
    hasProfileResults = profileShardResults != null;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:28,代码来源:QuerySearchResult.java

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

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

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

示例14: FieldSortBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public FieldSortBuilder(StreamInput in) throws IOException {
    fieldName = in.readString();
    nestedFilter = in.readOptionalNamedWriteable(QueryBuilder.class);
    nestedPath = in.readOptionalString();
    missing = in.readGenericValue();
    order = in.readOptionalWriteable(SortOrder::readFromStream);
    sortMode = in.readOptionalWriteable(SortMode::readFromStream);
    unmappedType = in.readOptionalString();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:FieldSortBuilder.java

示例15: HasChildQueryBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public HasChildQueryBuilder(StreamInput in) throws IOException {
    super(in);
    type = in.readString();
    minChildren = in.readInt();
    maxChildren = in.readInt();
    scoreMode = ScoreMode.values()[in.readVInt()];
    query = in.readNamedWriteable(QueryBuilder.class);
    innerHitBuilder = in.readOptionalWriteable(InnerHitBuilder::new);
    ignoreUnmapped = in.readBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:HasChildQueryBuilder.java


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