@Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeString(index);
   out.writeInt(shardId);
   timeout.writeTo(out);
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeByte(replicationType.id());
   out.writeByte(consistencyLevel.id());
   timeout.writeTo(out);
   out.writeString(index);
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeByte(replicationType.id());
   out.writeByte(consistencyLevel.id());
   timeout.writeTo(out);
   out.writeStringArrayNullable(indices);
   indicesOptions.writeIndicesOptions(out);
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   if (shardId != null) {
     out.writeBoolean(true);
     shardId.writeTo(out);
   } else {
     out.writeBoolean(false);
   }
   out.writeByte(consistencyLevel.id());
   timeout.writeTo(out);
   out.writeString(index);
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeUTF(cause);
   out.writeUTF(name);
   out.writeUTF(template);
   out.writeInt(order);
   out.writeBoolean(create);
   writeSettingsToStream(settings, out);
   timeout.writeTo(out);
   out.writeVInt(mappings.size());
   for (Map.Entry<String, String> entry : mappings.entrySet()) {
     out.writeUTF(entry.getKey());
     out.writeUTF(entry.getValue());
   }
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   if (nodesIds == null) {
     out.writeVInt(0);
   } else {
     out.writeVInt(nodesIds.length);
     for (String nodeId : nodesIds) {
       out.writeUTF(nodeId);
     }
   }
   if (timeout == null) {
     out.writeBoolean(false);
   } else {
     out.writeBoolean(true);
     timeout.writeTo(out);
   }
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeUTF(index);
   out.writeVInt(shardId);
   out.writeByte(searchType.id());
   out.writeVInt(numberOfShards);
   if (scroll == null) {
     out.writeBoolean(false);
   } else {
     out.writeBoolean(true);
     scroll.writeTo(out);
   }
   if (timeout == null) {
     out.writeBoolean(false);
   } else {
     out.writeBoolean(true);
     timeout.writeTo(out);
   }
   if (source == null) {
     out.writeVInt(0);
   } else {
     out.writeVInt(sourceLength);
     out.writeBytes(source, sourceOffset, sourceLength);
   }
   if (extraSource == null) {
     out.writeVInt(0);
   } else {
     out.writeVInt(extraSourceLength);
     out.writeBytes(extraSource, extraSourceOffset, extraSourceLength);
   }
   out.writeVInt(types.length);
   for (String type : types) {
     out.writeUTF(type);
   }
   if (filteringAliases != null) {
     out.writeVInt(filteringAliases.length);
     for (String index : filteringAliases) {
       out.writeUTF(index);
     }
   } else {
     out.writeVInt(0);
   }
   out.writeVLong(nowInMillis);
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeString(cause);
   out.writeString(name);
   out.writeString(template);
   out.writeInt(order);
   out.writeBoolean(create);
   writeSettingsToStream(settings, out);
   timeout.writeTo(out);
   out.writeVInt(mappings.size());
   for (Map.Entry<String, String> entry : mappings.entrySet()) {
     out.writeString(entry.getKey());
     out.writeString(entry.getValue());
   }
   out.writeVInt(customs.size());
   for (Map.Entry<String, IndexMetaData.Custom> entry : customs.entrySet()) {
     out.writeString(entry.getKey());
     IndexMetaData.lookupFactorySafe(entry.getKey()).writeTo(entry.getValue(), out);
   }
 }
示例#9
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeString(name);
   out.writeString(type);
   out.writeInt(min);
   out.writeInt(max);
   if (keepAlive == null) {
     out.writeBoolean(false);
   } else {
     out.writeBoolean(true);
     keepAlive.writeTo(out);
   }
   if (queueSize == null) {
     out.writeBoolean(false);
   } else {
     out.writeBoolean(true);
     queueSize.writeTo(out);
   }
   out.writeBoolean(false); // here to conform with removed waitTime
   out.writeBoolean(false); // here to conform with removed rejected setting
   out.writeBoolean(false); // here to conform with queue type
 }