code: void close() {
  
      synchronized (this.contextLifeCycle) {
  
        this.contextState = ReefServiceProtos.ContextStatusProto.State.DONE;
  
        if (this.task.isPresent()) {
          LOG.log(Level.WARNING, "Shutting down a task because the underlying context is being closed.");
          this.task.get().close(null);
        }
  
        if (this.childContext.isPresent()) {
          LOG.log(Level.WARNING, "Closing a context because its parent context is being closed.");
          this.childContext.get().close();
        }
  
        this.contextLifeCycle.close();
  
        if (this.parentContext.isPresent()) {
          this.parentContext.get().resetChildContext();
        }
      }
    }
docs: Close this context. If there is a child context, this recursively closes it before closing this context. If
  there is a Task currently running, that will be closed.