better toString support for improved log messages

Change-Id: I00fd950667bb7597ab7972cc76480234b15d00d1
This commit is contained in:
Axel Uhl committed 2016-09-28 17:55:32 +02:00
1 parent 0d257b3f9e
commit 65790122d3
1 file changed
+9
@@ -194,6 +194,10 @@ public class SmartFutureCache<K, V, U extends UpdateInterval<U>> {
return callable.call();
}
@Override
public String toString() {
return callable==null?"null":callable.toString();
}
}
/**
@@ -377,6 +381,11 @@ public class SmartFutureCache<K, V, U extends UpdateInterval<U>> {
public void setExecutorThisTaskIsScheduledFor(ThreadPoolExecutor executorThisTaskIsScheduledFor) {
tracingGetHelper.setExecutorThisTaskIsScheduledFor(executorThisTaskIsScheduledFor);
}
@Override
public String toString() {
return getClass().getName()+" [key="+key+", updateInterval="+updateInterval+", cacheUpdateComputer="+cacheUpdateComputer+"]";
}
}
public SmartFutureCache(CacheUpdater<K, V, U> cacheUpdateComputer, String nameForLocks) {