public boolean isDone() {
        synchronized (this) {
            return completed;
        }
    }
@return True if the visiting is done (either by error or success).
documentapi/src/main/java/com/yahoo/documentapi/VisitorControlHandler.java