コード例 #1
0
 static bool doDeleteFromStore(byte[] key,
                       Versioned version,
                       Node node,
                       Store store,
                       out bool result)
 {
     try
     {
         result = store.deleteKey(key, version);
         node.SetAvailable(); //TODO: Check the cpp source for node and what's it's doing.
         return true;
     }
     catch (UnreachableStoreException ex)
     {
         if (log.IsErrorEnabled) log.Error("Exception while calling store.get on " + node, ex);
         node.SetDown();
     }
     catch (System.Net.Sockets.SocketException ex)
     {
         if (log.IsErrorEnabled) log.Error("Exception while calling store.get on " + node, ex);
         node.SetDown();
     }
     catch (Exception ex)
     {
         if (log.IsErrorEnabled) log.Error("Exception while calling store.get on " + node, ex);
         node.SetDown();
     }
     finally
     {
         node.Requests++;
     }
     result = false;
     return false;
 }