added toString to there's more detail when troubleshooting timeout errors

This commit is contained in:
Adrian Cole 2011-07-28 22:15:57 -07:00
parent a802c2adf5
commit 4823c8b8f5
1 changed files with 12 additions and 0 deletions

View File

@ -119,6 +119,8 @@ public class FutureIterables {
final Map<T, Exception> errorMap = Maps.newHashMap(); final Map<T, Exception> errorMap = Maps.newHashMap();
for (final java.util.Map.Entry<T, ? extends Future<?>> future : responses.entrySet()) { for (final java.util.Map.Entry<T, ? extends Future<?>> future : responses.entrySet()) {
Futures.makeListenable(future.getValue(), exec).addListener(new Runnable() { Futures.makeListenable(future.getValue(), exec).addListener(new Runnable() {
@Override
public void run() { public void run() {
try { try {
future.getValue().get(); future.getValue().get();
@ -130,6 +132,11 @@ public class FutureIterables {
} }
doneSignal.countDown(); doneSignal.countDown();
} }
@Override
public String toString() {
return "callGetOnFuture(" + future.getKey() + "," + future.getValue() + ")";
}
}, exec); }, exec);
} }
try { try {
@ -168,6 +175,11 @@ public class FutureIterables {
} }
return null; return null;
} }
@Override
public String toString() {
return "callGetOnFuture()";
}
}); });
} }