Java Code Examples for org.elasticsearch.common.io.stream.StreamInput#readTimeValue()

The following examples show how to use org.elasticsearch.common.io.stream.StreamInput#readTimeValue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClusterHealthRequest.java    From crate with Apache License 2.0 6 votes vote down vote up
public ClusterHealthRequest(StreamInput in) throws IOException {
    super(in);
    int size = in.readVInt();
    if (size == 0) {
        indices = Strings.EMPTY_ARRAY;
    } else {
        indices = new String[size];
        for (int i = 0; i < indices.length; i++) {
            indices[i] = in.readString();
        }
    }
    timeout = in.readTimeValue();
    if (in.readBoolean()) {
        waitForStatus = ClusterHealthStatus.fromValue(in.readByte());
    }
    waitForNoRelocatingShards = in.readBoolean();
    waitForActiveShards = ActiveShardCount.readFrom(in);
    waitForNodes = in.readString();
    if (in.readBoolean()) {
        waitForEvents = Priority.readFrom(in);
    }
    waitForNoInitializingShards = in.readBoolean();
}
 
Example 2
Source File: ClusterHealthResponse.java    From crate with Apache License 2.0 5 votes vote down vote up
public ClusterHealthResponse(StreamInput in) throws IOException {
    clusterName = in.readString();
    clusterHealthStatus = ClusterHealthStatus.fromValue(in.readByte());
    clusterStateHealth = new ClusterStateHealth(in);
    numberOfPendingTasks = in.readInt();
    timedOut = in.readBoolean();
    numberOfInFlightFetch = in.readInt();
    delayedUnassignedShards = in.readInt();
    taskMaxWaitingTime = in.readTimeValue();
}
 
Example 3
Source File: ReplicationRequest.java    From crate with Apache License 2.0 5 votes vote down vote up
public ReplicationRequest(StreamInput in) throws IOException {
    super(in);
    if (in.readBoolean()) {
        shardId = new ShardId(in);
    } else {
        shardId = null;
    }
    waitForActiveShards = ActiveShardCount.readFrom(in);
    timeout = in.readTimeValue();
    index = in.readString();
    routedBasedOnClusterVersion = in.readVLong();
}
 
Example 4
Source File: ClearVotingConfigExclusionsRequest.java    From crate with Apache License 2.0 4 votes vote down vote up
public ClearVotingConfigExclusionsRequest(StreamInput in) throws IOException {
    super(in);
    waitForRemoval = in.readBoolean();
    timeout = in.readTimeValue();
}
 
Example 5
Source File: AddVotingConfigExclusionsRequest.java    From crate with Apache License 2.0 4 votes vote down vote up
public AddVotingConfigExclusionsRequest(StreamInput in) throws IOException {
    super(in);
    nodeDescriptions = in.readStringArray();
    timeout = in.readTimeValue();
}
 
Example 6
Source File: AcknowledgedRequest.java    From crate with Apache License 2.0 4 votes vote down vote up
public AcknowledgedRequest(StreamInput in) throws IOException {
    super(in);
    timeout = in.readTimeValue();
}
 
Example 7
Source File: MasterNodeRequest.java    From crate with Apache License 2.0 4 votes vote down vote up
protected MasterNodeRequest(StreamInput in) throws IOException {
    super(in);
    masterNodeTimeout = in.readTimeValue();
}