package com.lanyuanxiaoyao.service.info.controller;

import com.lanyuanxiaoyao.service.info.service.CleanService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Version
 *
 * @author lanyuanxiaoyao
 * @date 2024-01-03
 */
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
@RestController
@RequestMapping("/info")
public class CleanController {
    private static final Logger logger = LoggerFactory.getLogger(CleanController.class);

    private final CleanService cleanService;

    public CleanController(CleanService cleanService) {
        this.cleanService = cleanService;
    }

    @GetMapping("/clean_compaction_metrics")
    public Integer cleanCompactionMetrics() {
        return cleanService.cleanCompactionMetrics();
    }

    @GetMapping("/clean_table_version")
    public Integer cleanTableVersion() {
        return cleanService.cleanTableVersion();
    }
}
