@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; IndexMetaData that = (IndexMetaData) o; if (!aliases.equals(that.aliases)) return false; if (!index.equals(that.index)) return false; if (!mappings.equals(that.mappings)) return false; if (!settings.equals(that.settings)) return false; if (state != that.state) return false; return true; }
private void invalidateIfProjectBuildFileParserStateChanged(Cell cell) { ImmutableMap<String, String> cellEnv = cell.getBuckConfig().getEnvironment(); Iterable<String> defaultIncludes = new ParserConfig(cell.getBuckConfig()).getDefaultIncludes(); boolean invalidateCaches = false; try (AutoCloseableLock updateLock = cachedStateLock.updateLock()) { Iterable<String> expected = cachedIncludes.get(cell.getRoot()); if (!cellEnv.equals(cachedEnvironment)) { // Contents of System.getenv() have changed. Cowardly refuse to accept we'll parse // everything the same way. invalidateCaches = true; } else if (expected == null || !Iterables.elementsEqual(defaultIncludes, expected)) { // Someone's changed the default includes. That's almost definitely caused all our lovingly // cached data to be enormously wonky. invalidateCaches = true; } if (!invalidateCaches) { return; } try (AutoCloseableLock writeLock = cachedStateLock.writeLock()) { cachedEnvironment = cellEnv; cachedIncludes.put(cell.getRoot(), defaultIncludes); } } synchronized (this) { invalidateAllCaches(); knownCells.add(cell); } }
/** * Returns true if the schema of this and <code>other</code> is the same, this includes the table * name, as this is reflected in the ReferenceIdents of the columns. */ public boolean schemaEquals(DocIndexMetaData other) { if (this == other) return true; if (other == null) return false; // TODO: when analyzers are exposed in the info, equality has to be checked on them // see: TransportSQLActionTest.testSelectTableAliasSchemaExceptionColumnDefinition if (columns != null ? !columns.equals(other.columns) : other.columns != null) return false; if (primaryKey != null ? !primaryKey.equals(other.primaryKey) : other.primaryKey != null) return false; if (indices != null ? !indices.equals(other.indices) : other.indices != null) return false; if (references != null ? !references.equals(other.references) : other.references != null) return false; if (routingCol != null ? !routingCol.equals(other.routingCol) : other.routingCol != null) return false; return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof ReplicationParams)) return false; ReplicationParams r = (ReplicationParams) o; return klass.equals(r.klass) && options.equals(r.options); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ImmutableSettings that = (ImmutableSettings) o; if (classLoader != null ? !classLoader.equals(that.classLoader) : that.classLoader != null) return false; if (settings != null ? !settings.equals(that.settings) : that.settings != null) 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 true; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final ContainerConfig config = (ContainerConfig) o; if (attachStderr != null ? !attachStderr.equals(config.attachStderr) : config.attachStderr != null) { return false; } if (attachStdin != null ? !attachStdin.equals(config.attachStdin) : config.attachStdin != null) { return false; } if (attachStdout != null ? !attachStdout.equals(config.attachStdout) : config.attachStdout != null) { return false; } if (cmd != null ? !cmd.equals(config.cmd) : config.cmd != null) { return false; } if (domainname != null ? !domainname.equals(config.domainname) : config.domainname != null) { return false; } if (entrypoint != null ? !entrypoint.equals(config.entrypoint) : config.entrypoint != null) { return false; } if (env != null ? !env.equals(config.env) : config.env != null) { return false; } if (exposedPorts != null ? !exposedPorts.equals(config.exposedPorts) : config.exposedPorts != null) { return false; } if (hostname != null ? !hostname.equals(config.hostname) : config.hostname != null) { return false; } if (image != null ? !image.equals(config.image) : config.image != null) { return false; } if (networkDisabled != null ? !networkDisabled.equals(config.networkDisabled) : config.networkDisabled != null) { return false; } if (onBuild != null ? !onBuild.equals(config.onBuild) : config.onBuild != null) { return false; } if (openStdin != null ? !openStdin.equals(config.openStdin) : config.openStdin != null) { return false; } if (portSpecs != null ? !portSpecs.equals(config.portSpecs) : config.portSpecs != null) { return false; } if (stdinOnce != null ? !stdinOnce.equals(config.stdinOnce) : config.stdinOnce != null) { return false; } if (tty != null ? !tty.equals(config.tty) : config.tty != null) { return false; } if (user != null ? !user.equals(config.user) : config.user != null) { return false; } if (volumes != null ? !volumes.equals(config.volumes) : config.volumes != null) { return false; } if (workingDir != null ? !workingDir.equals(config.workingDir) : config.workingDir != null) { return false; } if (labels != null ? !labels.equals(config.labels) : config.labels != null) { return false; } if (macAddress != null ? !macAddress.equals(config.macAddress) : config.macAddress != null) { return false; } if (hostConfig != null ? !hostConfig.equals(config.hostConfig) : config.hostConfig != null) { return false; } if (stopSignal != null ? !stopSignal.equals(config.stopSignal) : config.stopSignal != null) { return false; } return true; }