當前位置: 首頁>>代碼示例>>Java>>正文


Java StreamInput.readThrowable方法代碼示例

本文整理匯總了Java中org.elasticsearch.common.io.stream.StreamInput.readThrowable方法的典型用法代碼示例。如果您正苦於以下問題:Java StreamInput.readThrowable方法的具體用法?Java StreamInput.readThrowable怎麽用?Java StreamInput.readThrowable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.elasticsearch.common.io.stream.StreamInput的用法示例。


在下文中一共展示了StreamInput.readThrowable方法的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();
    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

示例2: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    jobId = new UUID(in.readLong(), in.readLong());
    executionPhaseId = in.readVInt();
    bucketIdx = in.readVInt();
    isLast = in.readBoolean();
    inputId = in.readByte();

    boolean failure = in.readBoolean();
    if (failure) {
        throwable = in.readThrowable();
    } else {
        StreamBucket bucket = new StreamBucket(streamers);
        bucket.readFrom(in);
        rows = bucket;
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:19,代碼來源:DistributedResultRequest.java

示例3: ElasticsearchException

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
public ElasticsearchException(StreamInput in) throws IOException {
    super(in.readOptionalString(), in.readThrowable());
    readStackTrace(this, in);
    int numKeys = in.readVInt();
    for (int i = 0; i < numKeys; i++) {
        final String key = in.readString();
        final int numValues = in.readVInt();
        final ArrayList<String> values = new ArrayList<>(numValues);
        for (int j = 0; j < numValues; j++) {
            values.add(in.readString());
        }
        headers.put(key, values);
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:15,代碼來源:ElasticsearchException.java

示例4: handlerResponseError

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
private void handlerResponseError(StreamInput buffer, final TransportResponseHandler handler) {
    Throwable error;
    try {
        error = buffer.readThrowable();
    } catch (Throwable e) {
        error = new TransportSerializationException("Failed to deserialize exception response from stream", e);
    }
    handleException(handler, error);
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:10,代碼來源:LocalTransport.java

示例5: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    version = in.readLong();
    numDocs = in.readLong();
    if (in.readBoolean()) {
        storeException = in.readThrowable();
    }

}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:11,代碼來源:TransportNodesListGatewayStartedShards.java

示例6: UnassignedInfo

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
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 failover situations, elapsed delay time is forgotten.
    this.unassignedTimeNanos = System.nanoTime();
    this.message = in.readOptionalString();
    this.failure = in.readThrowable();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:10,代碼來源:UnassignedInfo.java

示例7: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    shardRouting = readShardRoutingEntry(in);
    indexUUID = in.readString();
    message = in.readString();
    finderNodeId = in.readString();
    failure = in.readThrowable();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:10,代碼來源:ShardStateAction.java

示例8: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    node = DiscoveryNode.readNode(in);
    version = in.readLong();
    allocation = Allocation.readFrom(in);
    if (in.readBoolean()) {
        storeException = in.readThrowable();
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:10,代碼來源:IndicesShardStoresResponse.java

示例9: 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();
    throwable = in.readThrowable();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:8,代碼來源:MultiGetResponse.java

示例10: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    if (in.readBoolean()) {
        response = new PercolateResponse();
        response.readFrom(in);
    } else {
        throwable = in.readThrowable();
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:10,代碼來源:MultiPercolateResponse.java

示例11: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    if (in.readBoolean()) {
        shardTarget = readSearchShardTarget(in);
    }
    reason = in.readString();
    status = RestStatus.readFrom(in);
    cause = in.readThrowable();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:10,代碼來源:ShardSearchFailure.java

示例12: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    if (in.readBoolean()) {
        this.response = new SearchResponse();
        response.readFrom(in);
    } else {
        throwable = in.readThrowable();
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:10,代碼來源:MultiSearchResponse.java

示例13: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    if (in.readBoolean()) {
        index = in.readString();
    }
    shardId = in.readVInt();
    reason = in.readThrowable();
    status = RestStatus.readFrom(in);
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:10,代碼來源:DefaultShardOperationFailedException.java

示例14: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    index = in.readString();
    shardId = in.readVInt();
    nodeId = in.readOptionalString();
    cause = in.readThrowable();
    status = RestStatus.readFrom(in);
    primary = in.readBoolean();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:10,代碼來源:ActionWriteResponse.java

示例15: 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();
    cause = in.readThrowable();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:8,代碼來源:MultiTermVectorsResponse.java


注:本文中的org.elasticsearch.common.io.stream.StreamInput.readThrowable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。