예제 #1
0
 public static DelegationTokenRenewer GetInstance()
 {
     lock (typeof(DelegationTokenRenewer))
     {
         if (Instance == null)
         {
             Instance = new DelegationTokenRenewer(typeof(FileSystem));
         }
         return(Instance);
     }
 }
예제 #2
0
 internal static void Reset()
 {
     lock (typeof(DelegationTokenRenewer))
     {
         if (Instance != null)
         {
             Instance.queue.Clear();
             Instance.Interrupt();
             try
             {
                 Instance.Join();
             }
             catch (Exception)
             {
                 Log.Warn("Failed to reset renewer");
             }
             finally
             {
                 Instance = null;
             }
         }
     }
 }
 public virtual void Setup()
 {
     DelegationTokenRenewer.renewCycle = RenewCycle;
     DelegationTokenRenewer.Reset();
     renewer = DelegationTokenRenewer.GetInstance();
 }