code: private void setAttemptsMap(String projectId, String eventCollection, Map<String, Integer> attempts) throws IOException {
          if (eventStore instanceof KeenAttemptCountingEventStore) {
              KeenAttemptCountingEventStore res = (KeenAttemptCountingEventStore)eventStore;
              StringWriter writer = null;
              try {
                  writer = new StringWriter();
                  jsonHandler.writeJson(writer, attempts);
                  String attemptsJSON = writer.toString();
                  res.setAttempts(projectId, eventCollection, attemptsJSON);
              } finally {
                  KeenUtils.closeQuietly(writer);
              }
          }
      }
docs: Set the attempts Map in the eventStore
  
  @param projectId the project id
  @param eventCollection the collection name
  @param attempts the current attempts Map
  @throws IOException