Exemplo n.º 1
0
 private LeaseRenewer(LeaseRenewer.Factory.Key factorykey)
 {
     this.factorykey = factorykey;
     UnsyncSetGraceSleepPeriod(LeaseRenewerGraceDefault);
     if (Log.IsTraceEnabled())
     {
         instantiationTrace = StringUtils.StringifyException(new Exception("TRACE"));
     }
     else
     {
         instantiationTrace = null;
     }
 }
Exemplo n.º 2
0
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj is LeaseRenewer.Factory.Key)
     {
         LeaseRenewer.Factory.Key that = (LeaseRenewer.Factory.Key)obj;
         return(this.authority.Equals(that.authority) && this.ugi.Equals(that.ugi));
     }
     return(false);
 }
Exemplo n.º 3
0
 /// <summary>Get a renewer.</summary>
 private LeaseRenewer Get(string authority, UserGroupInformation ugi)
 {
     lock (this)
     {
         LeaseRenewer.Factory.Key k = new LeaseRenewer.Factory.Key(authority, ugi);
         LeaseRenewer             r = renewers[k];
         if (r == null)
         {
             r           = new LeaseRenewer(k);
             renewers[k] = r;
         }
         return(r);
     }
 }