Set<Future<Object>> pushFutures = new HashSet<Future<Object>>();
for (Map.Entry<Address, List<PrepareCommand>> e : state.getState().entrySet()) {
if (log.isDebugEnabled())
log.debug("Pushing {0} uncommitted prepares to {1}", e.getValue().size(), e.getKey());
RehashControlCommand push = cf.buildRehashControlCommandTxLogPendingPrepares(self, e.getValue());
NotifyingNotifiableFuture<Object> f = new NotifyingFutureImpl(null);
pushFutures.add(f);
rpcManager.invokeRemotelyInFuture(Collections.singleton(e.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);
}