static bool doGetFromStore(byte[] key, Node node, Store store, out IList<Versioned> result) { result = null; try { result = store.get(key); 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++; } return false; }
static bool doPutFromStore(byte[] key, Versioned value, Node node, Store store) { try { store.put(key, value); 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++; } return false; }