/// <summary>
 /// Creates a builder with all elements set to the same values as the
 /// given CacheDirectiveInfo.
 /// </summary>
 public Builder(CacheDirectiveInfo directive)
 {
     this.id          = directive.GetId();
     this.path        = directive.GetPath();
     this.replication = directive.GetReplication();
     this.pool        = directive.GetPool();
     this.expiration  = directive.GetExpiration();
 }
Example #2
0
 public CacheDirective(CacheDirectiveInfo info)
     : this(info.GetId(), info.GetPath().ToUri().GetPath(), info.GetReplication(), info
            .GetExpiration().GetAbsoluteMillis())
 {
 }
        public override bool Equals(object o)
        {
            if (o == null)
            {
                return(false);
            }
            if (GetType() != o.GetType())
            {
                return(false);
            }
            CacheDirectiveInfo other = (CacheDirectiveInfo)o;

            return(new EqualsBuilder().Append(GetId(), other.GetId()).Append(GetPath(), other
                                                                             .GetPath()).Append(GetReplication(), other.GetReplication()).Append(GetPool(), other
                                                                                                                                                 .GetPool()).Append(GetExpiration(), other.GetExpiration()).IsEquals());
        }