code: public synchronized void clear()
      {
          for (String keyspaceName : getNonSystemKeyspaces())
          {
              KSMetaData ksm = getKSMetaData(keyspaceName);
              for (CFMetaData cfm : ksm.cfMetaData().values())
                  purge(cfm);
              clearKeyspaceDefinition(ksm);
          }
  
          updateVersionAndAnnounce();
      }
docs: Clear all KS/CF metadata and reset version.