code: public void clear() {
          if (nodes != null) {
              nodes.clear();
              nodes = new ArrayList<Node>();
          }
  
          if (ttlPerSession) {
              ttlValues.clear();
          }
      }
docs: Clear.