@Override
    public Long getValue() {
      if (optimizingType == null) {
        return optimizingInterval(lastOptimizingTime);
      }

      switch (optimizingType) {
        case MINOR:
          return optimizingInterval(lastMinorTime);
        case MAJOR:
          return optimizingInterval(lastMajorTime);
        case FULL:
          return optimizingInterval(lastFullTime);
        default:
          return AmoroServiceConstants.INVALID_TIME;
      }
    }
Handle table self optimizing process completed event.

@param processType optimizing process type.
@param success is optimizing process success.
amoro-ams/src/main/java/org/apache/amoro/server/table/TableOptimizingMetrics.java