if (r == null) {
return NO_RIAK_OBJECTS;
}
RpbPutResp resp = RiakKvPB.RpbPutResp.parseFrom(r);
RiakObject[] res = new RiakObject[resp.getContentCount()];
ByteString vclock = resp.getVclock();
// The key parameter will be set only if the server generated a
// key for the object so we check and set it accordingly
for (int i = 0; i < res.length; i++) {
res[i] = new RiakObject(vclock, value.getBucketBS(),
(resp.hasKey()) ? resp.getKey() : value.getKeyBS(),
resp.getContent(i));
}
return res;
} finally {
release(c);