<commit_before>package net.hawkengine.db.redis;

import net.hawkengine.core.ServerConfiguration;
import net.hawkengine.model.configuration.DatabaseConfig;
import net.hawkengine.model.enums.DatabaseType;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

public class RedisManager {
    private static JedisPool jedisPool;

    static JedisPool getJedisPool() {
        return jedisPool;
    }

    public static void connect() {
        DatabaseConfig config = ServerConfiguration.getConfiguration().getDatabaseConfigs().get(DatabaseType.REDIS);
        String host = config.getHost();
        int port = config.getPort();
        String password = config.getPassword();

        JedisPoolConfig poolConfig = new JedisPoolConfig();
        poolConfig.setTestOnBorrow(true);

        jedisPool = new JedisPool(poolConfig, host, port, 0, password);
    }

    public static void disconnect() {
        jedisPool.destroy();
    }
}<commit_msg>Increased the max number of resources in Jedis Pool <commit_after>package net.hawkengine.db.redis;

import net.hawkengine.core.ServerConfiguration;
import net.hawkengine.model.configuration.DatabaseConfig;
import net.hawkengine.model.enums.DatabaseType;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

public class RedisManager {
    private static JedisPool jedisPool;

    static JedisPool getJedisPool() {
        return jedisPool;
    }

    public static void connect() {
        DatabaseConfig config = ServerConfiguration.getConfiguration().getDatabaseConfigs().get(DatabaseType.REDIS);
        String host = config.getHost();
        int port = config.getPort();
        String password = config.getPassword();

        JedisPoolConfig poolConfig = new JedisPoolConfig();
        poolConfig.setMaxTotal(100);
        poolConfig.setBlockWhenExhausted(false);
        poolConfig.setTestOnBorrow(true);

        jedisPool = new JedisPool(poolConfig, host, port, 0, password);
    }

    public static void disconnect() {
        jedisPool.destroy();
    }
}
{'fraction_non_alphanumeric': 0.09279845335911067, 'fraction_numerical': 0.002416626389560174, 'mean_word_length': 3.683257918552036, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2651676', 'n_tokens_mistral': 607, 'n_tokens_neox': 598, 'n_words': 125}