@Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeString(name);
   out.writeString(type);
   writeSettingsToStream(settings, out);
   writeTimeout(out);
   if (out.getVersion().onOrAfter(Version.V_1_4_0)) {
     out.writeBoolean(verify);
   }
 }
 public static void writeTo(IndexTemplateMetaData indexTemplateMetaData, StreamOutput out)
     throws IOException {
   out.writeUTF(indexTemplateMetaData.name());
   out.writeInt(indexTemplateMetaData.order());
   out.writeUTF(indexTemplateMetaData.template());
   ImmutableSettings.writeSettingsToStream(indexTemplateMetaData.settings(), out);
   out.writeVInt(indexTemplateMetaData.mappings().size());
   for (Map.Entry<String, CompressedString> entry :
       indexTemplateMetaData.mappings().entrySet()) {
     out.writeUTF(entry.getKey());
     entry.getValue().writeTo(out);
   }
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeString(snapshot);
   out.writeString(repository);
   out.writeStringArray(indices);
   indicesOptions.writeIndicesOptions(out);
   out.writeOptionalString(renamePattern);
   out.writeOptionalString(renameReplacement);
   out.writeBoolean(waitForCompletion);
   out.writeBoolean(includeGlobalState);
   writeSettingsToStream(settings, out);
 }
 @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());
   }
 }
Esempio n. 5
0
 public static void writeTo(IndexMetaData indexMetaData, StreamOutput out) throws IOException {
   out.writeUTF(indexMetaData.index());
   out.writeLong(indexMetaData.version());
   out.writeByte(indexMetaData.state().id());
   writeSettingsToStream(indexMetaData.settings(), out);
   out.writeVInt(indexMetaData.mappings().size());
   for (MappingMetaData mappingMd : indexMetaData.mappings().values()) {
     MappingMetaData.writeTo(mappingMd, out);
   }
   out.writeVInt(indexMetaData.aliases().size());
   for (AliasMetaData aliasMd : indexMetaData.aliases().values()) {
     AliasMetaData.Builder.writeTo(aliasMd, out);
   }
   out.writeVInt(indexMetaData.customs().size());
   for (Map.Entry<String, Custom> entry : indexMetaData.customs().entrySet()) {
     out.writeUTF(entry.getKey());
     lookupFactorySafe(entry.getKey()).writeTo(entry.getValue(), out);
   }
 }
 @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);
   }
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeStringArrayNullable(indices);
   writeSettingsToStream(settings, out);
 }