public static DelegationTokenRenewer GetInstance()
 {
     lock (typeof(DelegationTokenRenewer))
     {
         if (Instance == null)
         {
             Instance = new DelegationTokenRenewer(typeof(FileSystem));
         }
         return(Instance);
     }
 }
 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();
 }