code: public synchronized void flush() {
  
          this.datas.forEach(ValidationData::minimalize);
  
          try {
              String jsonStr = this.objectMapper.writeValueAsString(this.datas);
              try {
                  ValidationFileUtil.writeStringToFile(new File(this.validationConfig.getRepositoryPath()), jsonStr);
              } catch (IOException e) {
                  throw new ValidationLibException("file write error", HttpStatus.INTERNAL_SERVER_ERROR);
              }
          } catch (JsonProcessingException e) {
              throw new ValidationLibException("json str parsing error", HttpStatus.INTERNAL_SERVER_ERROR);
          }
  
          this.datasRuleSync();
      }
docs: Flush.