예제 #1
0
 public virtual void MarkSuspectBlock(ExtendedBlock block)
 {
     lock (this)
     {
         if (stopping)
         {
             Log.Debug("{}: Not scheduling suspect block {} for " + "rescanning, because this volume scanner is stopping."
                       , this, block);
             return;
         }
         bool recent = recentSuspectBlocks.GetIfPresent(block);
         if (recent != null)
         {
             Log.Debug("{}: Not scheduling suspect block {} for " + "rescanning, because we rescanned it recently."
                       , this, block);
             return;
         }
         if (suspectBlocks.Contains(block))
         {
             Log.Debug("{}: suspect block {} is already queued for " + "rescanning.", this, block
                       );
             return;
         }
         suspectBlocks.AddItem(block);
         recentSuspectBlocks.Put(block, true);
         Log.Debug("{}: Scheduling suspect block {} for rescanning.", this, block);
         Sharpen.Runtime.Notify(this);
     }
 }
예제 #2
0
        public virtual void SetKeyProvider(Configuration conf, KeyProvider keyProvider)
        {
            URI uri = CreateKeyProviderURI(conf);

            cache.Put(uri, keyProvider);
        }