/** {@inheritDoc} */ @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"}) @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof GridBiTuple)) return false; GridBiTuple<?, ?> t = (GridBiTuple<?, ?>)o; // Both nulls or equals. return F.eq(val1, t.val1) && F.eq(val2, t.val2); }
/** {@inheritDoc} */ @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof GridSecurityCredentials)) return false; GridSecurityCredentials that = (GridSecurityCredentials)o; return F.eq(login, that.login) && F.eq(password, that.password) && F.eq(userObj, that.userObj); }
/** * @param cacheName Cache name. * @return {@code True} if this is Hadoop system cache. */ public static boolean isHadoopSystemCache(String cacheName) { return F.eq(cacheName, SYS_CACHE_HADOOP_MR); }
/** {@inheritDoc} */ @Override public boolean equals(Object o) { if (o == this) return true; if (o == null || getClass() != o.getClass()) return false; GridGgfsBlockLocationImpl that = (GridGgfsBlockLocationImpl)o; return len == that.len && start == that.start && F.eq(nodeIds, that.nodeIds) && F.eq(names, that.names) && F.eq(hosts, that.hosts); }
/** {@inheritDoc} */ @Nullable @Override public V remove(Object key) { V res = null; if (F.eq(key, k1)) { res = v1; v1 = null; k1 = null; } return res; }
/** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (obj == this) return true; if (obj == null || getClass() != obj.getClass()) return false; GridGgfsFileInfo that = (GridGgfsFileInfo)obj; return id.equals(that.id) && blockSize == that.blockSize && len == that.len && F.eq(affKey, that.affKey) && F.eq(props, that.props) && F.eq(lockId, that.lockId); }
/** * Tries to concatenate this range with a given one. If ranges are not adjacent, will return {@code null}. * * @param range Range to concatenate with. * @return Concatenation result or {@code null} if ranges are not adjacent. */ @Nullable public GridGgfsFileAffinityRange concat(GridGgfsFileAffinityRange range) { if (endOff + 1 != range.startOff || !F.eq(affKey, range.affKey) || status != RANGE_STATUS_INITIAL) return null; return new GridGgfsFileAffinityRange(startOff, range.endOff, affKey); }
private void checkSame(String name, String propName, UUID rmtNodeId, Object rmtVal, Object locVal, String ggfsName) throws GridException { if (!F.eq(rmtVal, locVal)) throw new GridException(name + " should be the same on all nodes in grid for GGFS configuration " + "(fix configuration or set " + "-D" + GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true system " + "property ) [rmtNodeId=" + rmtNodeId + ", rmt" + propName + "=" + rmtVal + ", loc" + propName + "=" + locVal + ", ggfName=" + ggfsName + ']'); } }
/** {@inheritDoc} */ @Nullable @Override public V remove(Object key) { if (F.eq(key, k4)) { V res = v4; v4 = null; k4 = null; return res; } return super.remove(key); }
/** {@inheritDoc} */ @Nullable @Override public V get(Object k) { V v = super.get(k); return v != null ? v : (k4 != null && F.eq(k, k4)) ? v4 : null; }
/** {@inheritDoc} */ @Nullable @Override public V remove(Object key) { if (F.eq(key, k5)) { V res = v5; v5 = null; k5 = null; return res; } return super.remove(key); }
/** {@inheritDoc} */ @Override public boolean equals(Object o) { if (o == this) return true; if (o == null || o.getClass() != getClass()) return false; GridGgfsBlockKey that = (GridGgfsBlockKey)o; return blockId == that.blockId && fileId.equals(that.fileId) && F.eq(affKey, that.affKey) && evictExclude == that.evictExclude; }
/** {@inheritDoc} */ @Override public V get(Object k) { V v = super.get(k); return v != null ? v : (k2 != null && F.eq(k, k2)) ? v2 : null; }
/** * Tries to concatenate this range with a given one. If ranges are not adjacent, will return {@code null}. * * @param range Range to concatenate with. * @return Concatenation result or {@code null} if ranges are not adjacent. */ @Nullable public GridGgfsFileAffinityRange concat(GridGgfsFileAffinityRange range) { if (endOff + 1 != range.startOff || !F.eq(affKey, range.affKey) || status != RANGE_STATUS_INITIAL) return null; return new GridGgfsFileAffinityRange(startOff, range.endOff, affKey); }
private void checkSame(String name, String propName, UUID rmtNodeId, Object rmtVal, Object locVal, String ggfsName) throws GridException { if (!F.eq(rmtVal, locVal)) throw new GridException(name + " should be the same on all nodes in grid for GGFS configuration " + "(fix configuration or set " + "-D" + GridSystemProperties.GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true system " + "property ) [rmtNodeId=" + rmtNodeId + ", rmt" + propName + "=" + rmtVal + ", loc" + propName + "=" + locVal + ", ggfName=" + ggfsName + ']'); } }
/** {@inheritDoc} */ @Override public boolean contains(Object o) { A.notNull(o, "o"); for (GridCacheEntry<K, V> e : map.values()) if (F.isAll(e, filter) && F.eq(e.getValue(), o)) return true; return false; } }
@Override public boolean apply(GridCache<?, ?> c) { return !CU.UTILITY_CACHE_NAME.equals(c.name()) && F.eq(spiName, c.configuration().getIndexingSpiName()); } }
/** {@inheritDoc} */ @SuppressWarnings({"unchecked"}) @Override public boolean equals(Object obj) { if (obj == this) return true; if (!(obj instanceof GridCacheEntryImpl)) return false; GridCacheEntryImpl<K, V> other = (GridCacheEntryImpl<K, V>)obj; V v1 = peek(); V v2 = other.peek(); return key.equals(other.key) && F.eq(ctx.cache().name(), other.ctx.cache().name()) && F.eq(v1, v2); }