public void operationComplete(final FutureChannelCreator future) throws Exception {
if (future.isSuccess()) {
final RoutingBuilder routingBuilder = createBuilder(builder);
fillRoutingBuilder(builder, routingBuilder);
final FutureRouting futureRouting = routing.route(routingBuilder, builder.isFastGet() ? Type.REQUEST_2 : Type.REQUEST_1, future.channelCreator());
futureDHT.futureRouting(futureRouting);
futureRouting.addListener(new BaseFutureAdapter<FutureRouting>() {
@Override
public void operationComplete(FutureRouting futureRouting) throws Exception {
if (futureRouting.isSuccess()) {
logger.debug("found direct hits for remove: {}",
futureRouting.directHits());
RequestP2PConfiguration p2pConfiguration2 = adjustConfiguration(builder.requestP2PConfiguration,
futureRouting.potentialHits().size());
parallelRequests(p2pConfiguration2,
builder.isFastGet() ? futureRouting.directHits(): EMPTY_NAVIGABLE_SET,
futureRouting.potentialHits(),
futureDHT, false, future.channelCreator(),
new OperationMapper<FutureRemove>() {
Map<PeerAddress, Map<Number640, Data>> rawDataResult = new HashMap<PeerAddress, Map<Number640, Data>>();
Map<PeerAddress, Map<Number640, Byte>> rawDataNoResult = new HashMap<PeerAddress, Map<Number640, Byte>>();