示例#1
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeString(clusterUUID);
   out.writeLong(version);
   Settings.writeSettingsToStream(transientSettings, out);
   Settings.writeSettingsToStream(persistentSettings, out);
   indices.writeTo(out);
   templates.writeTo(out);
   customs.writeTo(out);
 }
示例#2
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeString(index.getName()); // uuid will come as part of settings
   out.writeLong(version);
   out.writeByte(state.id());
   writeSettingsToStream(settings, out);
   out.writeVInt(mappings.size());
   for (ObjectCursor<MappingMetaData> cursor : mappings.values()) {
     cursor.value.writeTo(out);
   }
   out.writeVInt(aliases.size());
   for (ObjectCursor<AliasMetaData> cursor : aliases.values()) {
     cursor.value.writeTo(out);
   }
   out.writeVInt(customs.size());
   for (ObjectObjectCursor<String, Custom> cursor : customs) {
     out.writeString(cursor.key);
     cursor.value.writeTo(out);
   }
   out.writeVInt(activeAllocationIds.size());
   for (IntObjectCursor<Set<String>> cursor : activeAllocationIds) {
     out.writeVInt(cursor.key);
     DiffableUtils.StringSetValueSerializer.getInstance().write(cursor.value, out);
   }
 }
示例#3
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeLong(version);
   out.writeString(clusterUUID);
   writeSettingsToStream(transientSettings, out);
   writeSettingsToStream(persistentSettings, out);
   out.writeVInt(indices.size());
   for (IndexMetaData indexMetaData : this) {
     indexMetaData.writeTo(out);
   }
   out.writeVInt(templates.size());
   for (ObjectCursor<IndexTemplateMetaData> cursor : templates.values()) {
     cursor.value.writeTo(out);
   }
   out.writeVInt(customs.size());
   for (ObjectObjectCursor<String, Custom> cursor : customs) {
     out.writeString(cursor.key);
     cursor.value.writeTo(out);
   }
 }
示例#4
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeString(index);
   out.writeLong(version);
   out.writeByte(state.id);
   Settings.writeSettingsToStream(settings, out);
   mappings.writeTo(out);
   aliases.writeTo(out);
   customs.writeTo(out);
   activeAllocationIds.writeTo(out);
 }
示例#5
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeString(cause);
   out.writeString(index);
   writeSettingsToStream(settings, out);
   writeTimeout(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());
     entry.getValue().writeTo(out);
   }
   out.writeVInt(aliases.size());
   for (Alias alias : aliases) {
     alias.writeTo(out);
   }
   out.writeBoolean(updateAllTypes);
   waitForActiveShards.writeTo(out);
 }