本文整理了Java中org.elasticsearch.common.settings.Settings.equals()
方法的一些代码示例,展示了Settings.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Settings.equals()
方法的具体详情如下:
包路径:org.elasticsearch.common.settings.Settings
类名称:Settings
方法名:equals
暂无
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RepositoryMetaData that = (RepositoryMetaData) o;
if (!name.equals(that.name)) return false;
if (!type.equals(that.type)) return false;
return settings.equals(that.settings);
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@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);
}
代码示例来源:origin: org.elasticsearch/elasticsearch
/**
* Compare the specified settings for equality.
*
* @param left the left settings
* @param right the right settings
* @return true if the settings are the same, otherwise false
*/
public static boolean same(final Settings left, final Settings right) {
return left.filter(IndexScopedSettings.INDEX_SETTINGS_KEY_PREDICATE)
.equals(right.filter(IndexScopedSettings.INDEX_SETTINGS_KEY_PREDICATE));
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public boolean hasChanged(Settings current, Settings previous) {
return current.filter(loggerPredicate).equals(previous.filter(loggerPredicate)) == false;
}
代码示例来源:origin: org.elasticsearch/elasticsearch
if (lastSettingsApplied != null && newSettings.equals(lastSettingsApplied)) {
代码示例来源:origin: org.elasticsearch/elasticsearch
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;
}
代码示例来源:origin: org.elasticsearch/elasticsearch
return false;
if (!settings.equals(that.settings)) {
return false;
代码示例来源:origin: org.elasticsearch/elasticsearch
|| previousMetadata.settings().equals(repositoryMetaData.settings()) == false) {
代码示例来源:origin: harbby/presto-connectors
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FieldDataType that = (FieldDataType) o;
if (!settings.equals(that.settings)) return false;
if (!type.equals(that.type)) return false;
return true;
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RepositoryMetaData that = (RepositoryMetaData) o;
if (!name.equals(that.name)) return false;
if (!type.equals(that.type)) return false;
return settings.equals(that.settings);
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RepositoryMetaData that = (RepositoryMetaData) o;
if (!name.equals(that.name)) return false;
if (!type.equals(that.type)) return false;
return settings.equals(that.settings);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RepositoryMetaData that = (RepositoryMetaData) o;
if (!name.equals(that.name)) return false;
if (!type.equals(that.type)) return false;
return settings.equals(that.settings);
}
代码示例来源:origin: harbby/presto-connectors
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RepositoryMetaData that = (RepositoryMetaData) o;
if (!name.equals(that.name)) return false;
if (!type.equals(that.type)) return false;
return settings.equals(that.settings);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
@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);
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@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);
}
代码示例来源:origin: harbby/presto-connectors
@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;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
/**
* Compare the specified settings for equality.
*
* @param left the left settings
* @param right the right settings
* @return true if the settings are the same, otherwise false
*/
public static boolean same(final Settings left, final Settings right) {
return left.filter(IndexScopedSettings.INDEX_SETTINGS_KEY_PREDICATE)
.equals(right.filter(IndexScopedSettings.INDEX_SETTINGS_KEY_PREDICATE));
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public boolean hasChanged(Settings current, Settings previous) {
return current.filter(loggerPredicate).equals(previous.filter(loggerPredicate)) == false;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
@Override
public boolean hasChanged(Settings current, Settings previous) {
return current.filter(loggerPredicate).equals(previous.filter(loggerPredicate)) == false;
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
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;
}
内容来源于网络,如有侵权,请联系作者删除!