package com.liquidnet.common.cache.redis.util;

import com.liquidnet.common.cache.redis.config.AbstractRedisConfig;
import com.liquidnet.common.cache.redis.config.RedisQueueConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author AnJiabin <anjiabin@zhengzai.tv>
 * @version V1.0
 * @Description: TODO
 * @class: RedisQueueUtil
 * @Package com.liquidnet.common.cache.redis.util
 * @Copyright: LightNet @ Copyright (c) 2022
 * @date 2022/6/14 15:30
 */
@Slf4j
@Component("redisQueueUtil")
public final class RedisQueueUtil extends AbstractRedisUtil{
    @Autowired
    private RedisQueueConfig redisConfig;

    @Override
    public String fillingKey(String key) {
        return key;
    }

    @Override
    public int getDbs() {
        log.info("RedisQueueUtil.totalDbs:{}===", redisConfig.totalDbs);
        return redisConfig.totalDbs;
    }

    @Override
    AbstractRedisConfig getRedisConfig() {
        return this.redisConfig;
    }
}