code: private void createAccumulator(String producerId, Accumulate annotation, String accName, String statsName) {
          if (annotation != null && producerId != null && !producerId.isEmpty() &&
                  accName!=null && !accName.isEmpty() && statsName != null && !statsName.isEmpty()){
  
              AccumulatorDefinition definition = new AccumulatorDefinition();
              if (annotation.name().length() > 0) {
                  definition.setName(annotation.name());
              }else{
                  definition.setName(accName);
              }
              definition.setIntervalName(annotation.intervalName());
              definition.setProducerName(producerId);
              definition.setStatName(statsName);
              definition.setValueName(annotation.valueName());
              definition.setTimeUnit(annotation.timeUnit());
              AccumulatorRepository.getInstance().createAccumulator(definition);
          }
      }
docs: Create accumulator and register it.
  
  @param producerId id of the producer
  @param annotation Accumulate annotation
  @param accName Accumulator name
  @param statsName Statistics name