コード例 #1
0
  protected void clearAll() {
    ModelAccess.instance()
        .requireWrite(
            new Runnable() {
              @Override
              public void run() {
                List<TransientModelsModule> toRemove =
                    new ArrayList<TransientModelsModule>(myModuleMap.values());
                myModuleMap.clear();
                for (TransientModelsModule m : toRemove) {
                  MPSModuleRepository.getInstance().unregisterModule(m, myOwner);
                }
              }
            });

    TransientSwapSpace space = getTransientSwapSpace();
    if (space != null) {
      space.clear();
    }
    mySessionId = null;
    myKeptModels = 0;
  }