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


Java StreamInput.readLong方法代码示例

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


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

示例1: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    id = in.readLong();
    size = in.readVInt();
    docIds = new int[size];
    for (int i = 0; i < size; i++) {
        docIds[i] = in.readVInt();
    }
    byte flag = in.readByte();
    if (flag == 1) {
        lastEmittedDoc = Lucene.readFieldDoc(in);
    } else if (flag == 2) {
        lastEmittedDoc = Lucene.readScoreDoc(in);
    } else if (flag != 0) {
        throw new IOException("Unknown flag: " + flag);
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:19,代码来源:ShardFetchRequest.java

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

示例3: SearchSortValues

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public SearchSortValues(StreamInput in) throws IOException {
    int size = in.readVInt();
    if (size > 0) {
        sortValues = new Object[size];
        for (int i = 0; i < sortValues.length; i++) {
            byte type = in.readByte();
            if (type == 0) {
                sortValues[i] = null;
            } else if (type == 1) {
                sortValues[i] = in.readString();
            } else if (type == 2) {
                sortValues[i] = in.readInt();
            } else if (type == 3) {
                sortValues[i] = in.readLong();
            } else if (type == 4) {
                sortValues[i] = in.readFloat();
            } else if (type == 5) {
                sortValues[i] = in.readDouble();
            } else if (type == 6) {
                sortValues[i] = in.readByte();
            } else if (type == 7) {
                sortValues[i] = in.readShort();
            } else if (type == 8) {
                sortValues[i] = in.readBoolean();
            } else {
                throw new IOException("Can't match type [" + type + "]");
            }
        }
    } else {
        sortValues = new Object[0];
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:33,代码来源:SearchSortValues.java

示例4: QueryProfileShardResult

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public QueryProfileShardResult(StreamInput in) throws IOException {
    int profileSize = in.readVInt();
    queryProfileResults = new ArrayList<>(profileSize);
    for (int j = 0; j < profileSize; j++) {
        queryProfileResults.add(new ProfileResult(in));
    }

    profileCollector = new CollectorResult(in);
    rewriteTime = in.readLong();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:QueryProfileShardResult.java

示例5: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    pingNode = DiscoveryNode.readNode(in);
    isDeadNode = in.readBoolean();
    clusterName = ClusterName.readClusterName(in);
    masterNode = DiscoveryNode.readNode(in);
    clusterStateVersion = in.readLong();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:NodesFailureDetectionService.java

示例6: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    recoveryId = in.readLong();
    shardId = ShardId.readShardId(in);
    snapshotFiles = new Store.MetadataSnapshot(in);
    totalTranslogOps = in.readVInt();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:9,代码来源:RecoveryCleanFilesRequest.java

示例7: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    waitForActiveShards = ActiveShardCount.readFrom(in);
    type = in.readString();
    id = in.readString();
    routing = in.readOptionalString();
    parent = in.readOptionalString();
    if (in.readBoolean()) {
        script = new Script(in);
    }
    retryOnConflict = in.readVInt();
    refreshPolicy = RefreshPolicy.readFrom(in);
    if (in.readBoolean()) {
        doc = new IndexRequest();
        doc.readFrom(in);
    }
    fields = in.readOptionalStringArray();
    fetchSourceContext = in.readOptionalWriteable(FetchSourceContext::new);
    if (in.readBoolean()) {
        upsertRequest = new IndexRequest();
        upsertRequest.readFrom(in);
    }
    docAsUpsert = in.readBoolean();
    version = in.readLong();
    versionType = VersionType.fromValue(in.readByte());
    detectNoop = in.readBoolean();
    scriptedUpsert = in.readBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:30,代码来源:UpdateRequest.java

示例8: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public MappingMetaData readFrom(StreamInput in) throws IOException {
    String type = in.readString();
    CompressedXContent source = CompressedXContent.readCompressedString(in);
    // id
    Id id = new Id(in.readBoolean() ? in.readString() : null);
    // routing
    Routing routing = new Routing(in.readBoolean(), in.readBoolean() ? in.readString() : null);
    // timestamp

    boolean enabled = in.readBoolean();
    String path = in.readOptionalString();
    String format = in.readString();
    String defaultTimestamp = in.readOptionalString();
    Boolean ignoreMissing = null;

    ignoreMissing = in.readOptionalBoolean();

    final Timestamp timestamp = new Timestamp(enabled, path, format, defaultTimestamp, ignoreMissing);
    final boolean hasParentField = in.readBoolean();
    final long mappingVersion = in.readLong();

    ParsedVersion version = new ParsedVersion(null, VersionType.INTERNAL);
    boolean hasVersionPath = in.readBoolean();
    if (hasVersionPath) {
        String versionPath = in.readString();
        VersionType versionType = VersionType.fromValue(in.readByte());
        version = new ParsedVersion(versionPath, versionType);
    }
    return new MappingMetaData(type, source, id, routing, timestamp, hasParentField, version, mappingVersion);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:31,代码来源:MappingMetaData.java

示例9: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    maxDoc = in.readVLong();
    docCount = in.readLong();
    sumDocFreq = in.readLong();
    sumTotalTermFreq = in.readLong();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:FieldStats.java

示例10: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    indexCount = in.readVLong();
    indexTimeInMillis = in.readVLong();
    indexCurrent = in.readVLong();
    indexFailedCount = in.readVLong();
    deleteCount = in.readVLong();
    deleteTimeInMillis = in.readVLong();
    deleteCurrent = in.readVLong();
    noopUpdateCount = in.readVLong();
    isThrottled = in.readBoolean();
    throttleTimeInMillis = in.readLong();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:IndexingStats.java

示例11: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    scriptLang = in.readString();
    id = in.readOptionalString();
    source = in.readBytesReference();

    opType = IndexRequest.OpType.fromId(in.readByte());
    version = in.readLong();
    versionType = VersionType.fromValue(in.readByte());
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:12,代码来源:PutIndexedScriptRequest.java

示例12: DateHistogramAggregationBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/** Read from a stream, for internal use only. */
public DateHistogramAggregationBuilder(StreamInput in) throws IOException {
    super(in, ValuesSourceType.NUMERIC, ValueType.DATE);
    if (in.readBoolean()) {
        order = InternalOrder.Streams.readOrder(in);
    }
    keyed = in.readBoolean();
    minDocCount = in.readVLong();
    interval = in.readLong();
    dateHistogramInterval = in.readOptionalWriteable(DateHistogramInterval::new);
    offset = in.readLong();
    extendedBounds = in.readOptionalWriteable(ExtendedBounds::new);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:DateHistogramAggregationBuilder.java

示例13: UnassignedInfo

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public UnassignedInfo(StreamInput in) throws IOException {
    this.reason = Reason.values()[(int) in.readByte()];
    this.unassignedTimeMillis = in.readLong();
    // As System.nanoTime() cannot be compared across different JVMs, reset it to now.
    // This means that in master fail-over situations, elapsed delay time is forgotten.
    this.unassignedTimeNanos = System.nanoTime();
    this.delayed = in.readBoolean();
    this.message = in.readOptionalString();
    this.failure = in.readException();
    this.failedAllocations = in.readVInt();
    this.lastAllocationStatus = AllocationStatus.readFrom(in);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:UnassignedInfo.java

示例14: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    recoveryId = in.readLong();
    shardId = ShardId.readShardId(in);
    currentOffset = in.readLong();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:RecoveryCheckTranslogOffsetRequest.java

示例15: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    path = in.readOptionalString();
    mount = in.readOptionalString();
    type = in.readOptionalString();
    total = in.readLong();
    free = in.readLong();
    available = in.readLong();
    spins = in.readOptionalBoolean();
    limit = in.readLong();
    limitFree = in.readLong();
    esUsed = in.readLong();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:14,代码来源:FsInfo.java


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