- Enclosing class:
- TaskMonitor
private static class TaskMonitor.TaskAndWeakRefPair
extends Object
This class encapsulates an object as well as a weak reference to a proxy
that passes through calls to that object. In art form:
Proxy <------------------
| \
v \
PassthroughInvocationHandler | weak reference
| /
MonitoredTaskImpl /
| /
StatAndWeakRefProxy ------/
Since we only return the Proxy to the creator of the MonitorableStatus,
this means that they can leak that object, and we'll detect it
since our weak reference will go null. But, we still have the actual
object, so we can log it and display it as a leaked (incomplete) action.