MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / deserialize

Method deserialize

src/AtomicIncrementRequest.java:266–279  ·  view source on GitHub ↗
(final ChannelBuffer buf, int cell_size)

Source from the content-addressed store, hash-verified

264 }
265
266 @Override
267 Object deserialize(final ChannelBuffer buf, int cell_size) {
268 final MutateResponse resp = readProtobuf(buf, MutateResponse.PARSER);
269 // An increment must always produce a result, so we shouldn't need to
270 // check whether the `result' field is set here.
271 final ArrayList<KeyValue> kvs = GetRequest.convertResult(resp.getResult(),
272 buf, cell_size);
273 if (kvs.size() != 1) {
274 throw new InvalidResponseException("Atomic increment returned "
275 + kvs.size() + " KeyValue(s), but we expected exactly one. kvs="
276 + kvs, resp);
277 }
278 return Bytes.getLong(kvs.get(0).value());
279 }
280
281}

Callers

nothing calls this directly

Calls 6

convertResultMethod · 0.95
getLongMethod · 0.95
readProtobufMethod · 0.80
valueMethod · 0.65
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected