@Override
 public void readFrom(StreamInput in) throws IOException {
   super.readFrom(in);
   replicationType = ReplicationType.fromId(in.readByte());
   consistencyLevel = WriteConsistencyLevel.fromId(in.readByte());
   timeout = TimeValue.readTimeValue(in);
   index = in.readString();
 }
 @Override
 public void readFrom(StreamInput in) throws IOException {
   super.readFrom(in);
   index = in.readString();
   shardId = in.readInt();
   timeout = TimeValue.readTimeValue(in);
   // no need to pass threading over the network, they are always false when coming throw a thread
   // pool
 }
 @Override
 public void readFrom(StreamInput in) throws IOException {
   nodesIds = new String[in.readVInt()];
   for (int i = 0; i < nodesIds.length; i++) {
     nodesIds[i] = in.readUTF();
   }
   if (in.readBoolean()) {
     timeout = TimeValue.readTimeValue(in);
   }
 }
 @Override
 public void readFrom(StreamInput in) throws IOException {
   super.readFrom(in);
   taskId = TaskId.readFromStream(in);
   parentTaskId = TaskId.readFromStream(in);
   nodesIds = in.readStringArray();
   actions = in.readStringArray();
   if (in.readBoolean()) {
     timeout = TimeValue.readTimeValue(in);
   }
 }
 @Override
 public void readFrom(StreamInput in) throws IOException {
   super.readFrom(in);
   if (in.readBoolean()) {
     shardId = ShardId.readShardId(in);
   } else {
     shardId = null;
   }
   consistencyLevel = WriteConsistencyLevel.fromId(in.readByte());
   timeout = TimeValue.readTimeValue(in);
   index = in.readString();
 }
Esempio n. 6
0
 @Override
 public void readFrom(StreamInput in) throws IOException {
   name = in.readString();
   type = in.readString();
   min = in.readInt();
   max = in.readInt();
   if (in.readBoolean()) {
     keepAlive = TimeValue.readTimeValue(in);
   }
   if (in.readBoolean()) {
     queueSize = SizeValue.readSizeValue(in);
   }
   in.readBoolean(); // here to conform with removed waitTime
   in.readBoolean(); // here to conform with removed rejected setting
   in.readBoolean(); // here to conform with queue type
 }