Beispiel #1
0
 public void OnRemoval(RemovalNotification <string, KMSAudit.AuditEvent> entry)
 {
     KMSAudit.AuditEvent @event = entry.Value;
     if (@event.GetAccessCount().Get() > 0)
     {
         this._enclosing.LogEvent(@event);
         @event.GetAccessCount().Set(0);
         this._enclosing.cache.Put(entry.Key, @event);
     }
 }
Beispiel #2
0
 public void OnRemoval(RemovalNotification <DFSClientCache.DFSInputStreamCaheKey, FSDataInputStream
                                            > notification)
 {
     try
     {
         notification.Value.Close();
     }
     catch (IOException)
     {
     }
 }
Beispiel #3
0
        private void InternalNotifyOfRemoval(ref K key, ref V value, RemovalCause cause)
        {
            if (!HasRemovalListener)
            {
                return;
            }

            RemovalNotification <K, V> removalNotification = new RemovalNotification <K, V>(key, value, cause);

            RemovalListener(removalNotification);
        }
 public void OnRemoval(RemovalNotification <URI, KeyProvider> notification)
 {
     try
     {
         notification.Value.Close();
     }
     catch (Exception e)
     {
         Org.Apache.Hadoop.Hdfs.KeyProviderCache.Log.Error("Error closing KeyProvider with uri ["
                                                           + notification.Key + "]", e);
     }
 }
Beispiel #5
0
            public void OnRemoval(RemovalNotification <string, DFSClient> notification)
            {
                DFSClient client = notification.Value;

                try
                {
                    client.Close();
                }
                catch (IOException e)
                {
                    DFSClientCache.Log.Warn(string.Format("IOException when closing the DFSClient(%s), cause: %s"
                                                          , client, e));
                }
            }