@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RestoreInProgress that = (RestoreInProgress) o; if (!entries.equals(that.entries)) return false; return true; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } GetMappingsResponse other = (GetMappingsResponse) obj; return this.mappings.equals(other.mappings); } }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Entry entry = (Entry) o; if (includeGlobalState != entry.includeGlobalState) return false; if (partial != entry.partial) return false; if (startTime != entry.startTime) return false; if (!indices.equals(entry.indices)) return false; if (!shards.equals(entry.shards)) return false; if (!snapshot.equals(entry.snapshot)) return false; if (state != entry.state) return false; if (!waitingIndices.equals(entry.waitingIndices)) return false; if (repositoryStateId != entry.repositoryStateId) return false; return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; IndexTemplateMetaData that = (IndexTemplateMetaData) o; if (order != that.order) return false; if (!mappings.equals(that.mappings)) return false; if (!name.equals(that.name)) return false; if (!settings.equals(that.settings)) return false; if (!patterns.equals(that.patterns)) return false; return Objects.equals(version, that.version); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } @SuppressWarnings("unchecked") Entry entry = (Entry) o; return uuid.equals(entry.uuid) && snapshot.equals(entry.snapshot) && state == entry.state && indices.equals(entry.indices) && shards.equals(entry.shards); }
/** * Returns a set of custom meta data types when any custom metadata for the cluster has changed * between the previous cluster state and the new cluster state. custom meta data types are * returned iff they have been added, updated or removed between the previous and the current state */ public Set<String> changedCustomMetaDataSet() { Set<String> result = new HashSet<>(); ImmutableOpenMap<String, MetaData.Custom> currentCustoms = state.metaData().customs(); ImmutableOpenMap<String, MetaData.Custom> previousCustoms = previousState.metaData().customs(); if (currentCustoms.equals(previousCustoms) == false) { for (ObjectObjectCursor<String, MetaData.Custom> currentCustomMetaData : currentCustoms) { // new custom md added or existing custom md changed if (previousCustoms.containsKey(currentCustomMetaData.key) == false || currentCustomMetaData.value.equals(previousCustoms.get(currentCustomMetaData.key)) == false) { result.add(currentCustomMetaData.key); } } // existing custom md deleted for (ObjectObjectCursor<String, MetaData.Custom> previousCustomMetaData : previousCustoms) { if (currentCustoms.containsKey(previousCustomMetaData.key) == false) { result.add(previousCustomMetaData.key); } } } return result; }
public static boolean isGlobalStateEquals(MetaData metaData1, MetaData metaData2) { if (!metaData1.persistentSettings.equals(metaData2.persistentSettings)) { return false; } if (!metaData1.templates.equals(metaData2.templates())) { return false; } // Check if any persistent metadata needs to be saved int customCount1 = 0; for (ObjectObjectCursor<String, Custom> cursor : metaData1.customs) { if (cursor.value.context().contains(XContentContext.GATEWAY)) { if (!cursor.value.equals(metaData2.custom(cursor.key))) return false; customCount1++; } } int customCount2 = 0; for (ObjectCursor<Custom> cursor : metaData2.customs.values()) { if (cursor.value.context().contains(XContentContext.GATEWAY)) { customCount2++; } } if (customCount1 != customCount2) return false; return true; }
public boolean equalsAliases(MetaData other) { for (ObjectCursor<IndexMetaData> cursor : other.indices().values()) { IndexMetaData otherIndex = cursor.value; IndexMetaData thisIndex = index(otherIndex.getIndex()); if (thisIndex == null) { return false; } if (otherIndex.getAliases().equals(thisIndex.getAliases()) == false) { return false; } } return true; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } GetMappingsResponse other = (GetMappingsResponse) obj; return this.mappings.equals(other.mappings); } }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } GetMappingsResponse other = (GetMappingsResponse) obj; return this.mappings.equals(other.mappings); } }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; IndexTemplateMetaData that = (IndexTemplateMetaData) o; if (order != that.order) return false; if (!mappings.equals(that.mappings)) return false; if (!name.equals(that.name)) return false; if (!settings.equals(that.settings)) return false; if (!patterns.equals(that.patterns)) return false; return Objects.equals(version, that.version); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; IndexTemplateMetaData that = (IndexTemplateMetaData) o; if (order != that.order) return false; if (!mappings.equals(that.mappings)) return false; if (!name.equals(that.name)) return false; if (!settings.equals(that.settings)) return false; if (!template.equals(that.template)) return false; return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; IndexTemplateMetaData that = (IndexTemplateMetaData) o; if (order != that.order) return false; if (!mappings.equals(that.mappings)) return false; if (!name.equals(that.name)) return false; if (!settings.equals(that.settings)) return false; if (!template.equals(that.template)) return false; return Objects.equals(version, that.version); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } @SuppressWarnings("unchecked") Entry entry = (Entry) o; return snapshot.equals(entry.snapshot) && state == entry.state && indices.equals(entry.indices) && shards.equals(entry.shards); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } @SuppressWarnings("unchecked") Entry entry = (Entry) o; return snapshot.equals(entry.snapshot) && state == entry.state && indices.equals(entry.indices) && shards.equals(entry.shards); }
public boolean equalsAliases(MetaData other) { for (ObjectCursor<IndexMetaData> cursor : other.indices().values()) { IndexMetaData otherIndex = cursor.value; IndexMetaData thisIndex = index(otherIndex.getIndex()); if (thisIndex == null) { return false; } if (otherIndex.getAliases().equals(thisIndex.getAliases()) == false) { return false; } } return true; }
public boolean equalsAliases(MetaData other) { for (ObjectCursor<IndexMetaData> cursor : other.indices().values()) { IndexMetaData otherIndex = cursor.value; IndexMetaData thisIndex = index(otherIndex.getIndex()); if (thisIndex == null) { return false; } if (otherIndex.getAliases().equals(thisIndex.getAliases()) == false) { return false; } } return true; }
public boolean equalsAliases(MetaData other) { for (ObjectCursor<IndexMetaData> cursor : other.indices().values()) { IndexMetaData otherIndex = cursor.value; IndexMetaData thisIndex = index(otherIndex.getIndex()); if (thisIndex == null) { return false; } if (otherIndex.getAliases().equals(thisIndex.getAliases()) == false) { return false; } } return true; }
public boolean equalsAliases(MetaData other) { for (ObjectCursor<IndexMetaData> cursor : other.indices().values()) { IndexMetaData otherIndex = cursor.value; IndexMetaData thisIndex= indices().get(otherIndex.getIndex()); if (thisIndex == null) { return false; } if (otherIndex.getAliases().equals(thisIndex.getAliases()) == false) { return false; } } return true; }