public override bool Equals(object o) { if (o == null) { return(false); } if (o == this) { return(true); } if (o.GetType() != GetType()) { return(false); } Org.Apache.Hadoop.Hdfs.Protocol.CachePoolInfo other = (Org.Apache.Hadoop.Hdfs.Protocol.CachePoolInfo )o; return(new EqualsBuilder().Append(poolName, other.poolName).Append(ownerName, other .ownerName).Append(groupName, other.groupName).Append(mode, other.mode).Append(limit , other.limit).Append(maxRelativeExpiryMs, other.maxRelativeExpiryMs).IsEquals()); }
/// <exception cref="System.IO.IOException"/> public static void Validate(Org.Apache.Hadoop.Hdfs.Protocol.CachePoolInfo info) { if (info == null) { throw new InvalidRequestException("CachePoolInfo is null"); } if ((info.GetLimit() != null) && (info.GetLimit() < 0)) { throw new InvalidRequestException("Limit is negative."); } if (info.GetMaxRelativeExpiryMs() != null) { long maxRelativeExpiryMs = info.GetMaxRelativeExpiryMs(); if (maxRelativeExpiryMs < 0l) { throw new InvalidRequestException("Max relative expiry is negative."); } if (maxRelativeExpiryMs > CacheDirectiveInfo.Expiration.MaxRelativeExpiryMs) { throw new InvalidRequestException("Max relative expiry is too big."); } } ValidateName(info.poolName); }