class CompletionHandler implements Stoppable {
private final Lock lock = new ReentrantLock();
private final Condition condition = lock.newCondition();
private boolean running;
private boolean stopped;
<BUG>private long lastActivityAt;
</BUG>
private ActivityListener activityListener = new EmptyActivityListener();
<BUG>CompletionHandler() {
updateActivityTimestamp();
}</BUG>
public CompletionHandler setActivityListener(ActivityListener activityListener) {

class CompletionHandler implements Stoppable {
private final Lock lock = new ReentrantLock();
private final Condition condition = lock.newCondition();
private boolean running;
private boolean stopped;
private long lastActivityAt = -1;
private ActivityListener activityListener = new EmptyActivityListener();
public CompletionHandler setActivityListener(ActivityListener activityListener) {
