private static class TaskMonitor.TaskAndWeakRefPair extends Object
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.| Modifier and Type | Field and Description |
|---|---|
private MonitoredTask |
impl |
private WeakReference<MonitoredTask> |
weakProxy |
| Constructor and Description |
|---|
TaskAndWeakRefPair(MonitoredTask stat,
MonitoredTask proxy) |
private MonitoredTask impl
private WeakReference<MonitoredTask> weakProxy
public TaskAndWeakRefPair(MonitoredTask stat, MonitoredTask proxy)
public MonitoredTask get()
public boolean isDead()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.