code: Action getActionToChangeEncryptionKey() {
          Action action = new Action();
          action.add(
                  new ActionBlock() {
                      @Override
                      public void execute() throws ActionException {
                          if (!deleteViewFiles()) {
                              throw new ActionException("Cannot delete view files");
                          }
                      }
                  },
                  new ActionBlock() {
                      @Override
                      public void execute() throws ActionException {
                          try {
                              openIndex(Database.Create);
                          } catch (ForestException e) {
                              throw new ActionException("Cannot open index", e);
                          }
                          closeIndex();
                      }
                  }
          );
          return action;
      }
docs: /////////////////////////////////////////////////////////////////////////