MCPcopy Create free account
hub / github.com/bft-smart/library / insert

Method insert

src/main/java/bftsmart/demo/ycsb/YCSBClient.java:58–72  ·  view source on GitHub ↗
(String table, String key,
            HashMap<String, ByteIterator> values)

Source from the content-addressed store, hash-verified

56 }
57
58 @Override
59 public int insert(String table, String key,
60 HashMap<String, ByteIterator> values) {
61
62 Iterator<String> keys = values.keySet().iterator();
63 HashMap<String, byte[]> map = new HashMap<>();
64 while (keys.hasNext()) {
65 String field = keys.next();
66 map.put(field, values.get(field).toArray());
67 }
68 YCSBMessage msg = YCSBMessage.newInsertRequest(table, key, map);
69 byte[] reply = proxy.invokeOrdered(msg.getBytes());
70 YCSBMessage replyMsg = YCSBMessage.getObject(reply);
71 return replyMsg.getResult();
72 }
73
74 @Override
75 public int read(String table, String key,

Callers

nothing calls this directly

Calls 8

newInsertRequestMethod · 0.95
getBytesMethod · 0.95
getObjectMethod · 0.95
getResultMethod · 0.95
keySetMethod · 0.80
putMethod · 0.80
invokeOrderedMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected