Set<Future<Object>> pushFutures = new HashSet<Future<Object>>();
for (Map.Entry<Address, List<WriteCommand>> entry : state.getState().entrySet()) {
if (log.isDebugEnabled())
log.debug("Pushing {0} modifications to {1}", entry.getValue().size(), entry.getKey());
RehashControlCommand push = cf.buildRehashControlCommandTxLog(self, entry.getValue());
NotifyingNotifiableFuture<Object> f = new NotifyingFutureImpl(null);
pushFutures.add(f);
rpcManager.invokeRemotelyInFuture(Collections.singleton(entry.getKey()), push, true, f,
configuration.getRehashRpcTimeout());
}
for (Future f : pushFutures) {
try {
f.get();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} catch (ExecutionException e) {
log.error("Error pushing tx log", e);
}