package com.citygis.web.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface KafkaMonitorMapper {

    Integer addDiskUsage(@Param("id") String id,
                         @Param("createTime") String createTime,
                         @Param("diskUsage") Float diskUsage);

    Integer addCpuUsage(@Param("id") String id,
                        @Param("createTime") String createTime,
                        @Param("cpuUsage") Float cpuUsage);

    Integer addUnderreplicated(@Param("id") String id,
                               @Param("createTime") String createTime,
                               @Param("num") Integer num,
                               @Param("topic") String topic,
                               @Param("partition") int partition);

    Integer addPersec(@Param("id") String id,
                      @Param("createTime") String createTime,
                      @Param("persec") double persec,
                      @Param("persecType") String persecType,
                      @Param("topic") String topic);

    Integer addConsumerMessage(@Param("id") String id,
                               @Param("createTime") String createTime,
                               @Param("num") Integer num,
                               @Param("topic") String topic,
                               @Param("consumerSpeed") Float consumerSpeed);

    Integer queryMaxNum(String topic);


    Integer addConnectionNum(@Param("id") String id,
                             @Param("createTime") String createTime,
                             @Param("num") Integer connectionNum);

    Integer addTopicSize(@Param("id") String id,
                         @Param("createTime") String createTime,
                         @Param("num") Integer num,
                         @Param("topic") String topic);

    Integer addThrottledrate(@Param("id") String id,
                             @Param("createTime") String createTime,
                             @Param("num") Long num,
                             @Param("numType") String numType,
                             @Param("topic") String topic);

    Integer addLagMsg(@Param("id") String id,
                      @Param("createTime") String createTime,
                      @Param("num") int num,
                      @Param("topic") String topic,
                      @Param("endOffset") int endOffset);

}
