@Override
public void interMediateResponse(FutureResponse future) {
// the future tells us that the communication was successful, which is
// ok for digest
if (future.isSuccess()) {
final DigestResult digest;
if (builder.isReturnMetaValues()) {
Map<Number640, Data> dataMap = future.responseMessage()
.dataMap(0).dataMap();
digest = new DigestResult(dataMap);
} else if (builder.isReturnBloomFilter()) {
SimpleBloomFilter<Number160> sbf1 = future.responseMessage()
.bloomFilter(0);
SimpleBloomFilter<Number160> sbf2 = future.responseMessage()
.bloomFilter(1);
digest = new DigestResult(sbf1, sbf2);
} else {
NavigableMap<Number640, Collection<Number160>> keyDigest = future
.responseMessage().keyMap640Keys(0).keysMap();
digest = new DigestResult(keyDigest);
}
rawDigest.put(future.request().recipient(), digest);
logger.debug("set data from {}", future.request().recipient());
}
}