@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeVInt(indexTemplates.size()); for (IndexTemplateMetaData indexTemplate : indexTemplates) { indexTemplate.writeTo(out); } }
@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); } // filter out custom states not supported by the other node int numberOfCustoms = 0; for (final ObjectCursor<Custom> cursor : customs.values()) { if (FeatureAware.shouldSerialize(out, cursor.value)) { numberOfCustoms++; } } out.writeVInt(numberOfCustoms); for (final ObjectCursor<Custom> cursor : customs.values()) { if (FeatureAware.shouldSerialize(out, cursor.value)) { out.writeNamedWriteable(cursor.value); } } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeVInt(indexTemplates.size()); for (IndexTemplateMetaData indexTemplate : indexTemplates) { indexTemplate.writeTo(out); } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeVInt(indexTemplates.size()); for (IndexTemplateMetaData indexTemplate : indexTemplates) { indexTemplate.writeTo(out); } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeVInt(indexTemplates.size()); for (IndexTemplateMetaData indexTemplate : indexTemplates) { indexTemplate.writeTo(out); } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeVInt(indexTemplates.size()); for (IndexTemplateMetaData indexTemplate : indexTemplates) { indexTemplate.writeTo(out); } } }
@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); } }
@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); } // filter out custom states not supported by the other node int numberOfCustoms = 0; for (final ObjectCursor<Custom> cursor : customs.values()) { if (FeatureAware.shouldSerialize(out, cursor.value)) { numberOfCustoms++; } } out.writeVInt(numberOfCustoms); for (final ObjectCursor<Custom> cursor : customs.values()) { if (FeatureAware.shouldSerialize(out, cursor.value)) { out.writeNamedWriteable(cursor.value); } } }
@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); } // filter out custom states not supported by the other node int numberOfCustoms = 0; for (ObjectCursor<Custom> cursor : customs.values()) { if (out.getVersion().onOrAfter(cursor.value.getMinimalSupportedVersion())) { numberOfCustoms++; } } out.writeVInt(numberOfCustoms); for (ObjectCursor<Custom> cursor : customs.values()) { if (out.getVersion().onOrAfter(cursor.value.getMinimalSupportedVersion())) { out.writeNamedWriteable(cursor.value); } } }