<commit_before>package com.crimsonhexagon.rsm.redisson;

import org.redisson.Config;
import org.redisson.codec.SerializationCodec;

import com.crimsonhexagon.rsm.RedisSessionClient;
import com.crimsonhexagon.rsm.RedisSessionManager;

/**
 * Manager for a single server using redisson
 *
 * @author <NAME>
 */
public class SingleServerSessionManager extends RedisSessionManager {
	private String endpoint = "localhost:6379";
	private int connectionPoolSize = 100;
	private int database = 0;
	private String password = <PASSWORD>;
	private int timeout = 60000;
	private int pingTimeout = 1000;
	private int retryAttempts = 20;
	private int retryInterval = 1000;
	
	/**
	 * Initialize the {@link RedisSessionClient}
	 * @throws ClassNotFoundException
	 * @throws InstantiationException
	 * @throws IllegalAccessException
	 */
	@Override
	protected RedisSessionClient buildClient() {
		Config config = new Config();
		config.setCodec(new SerializationCodec());
		config.useSingleServer()
			.setAddress(getEndpoint())
			.setDatabase(database)
			.setConnectionPoolSize(connectionPoolSize)
			.setPassword(password)
			.setTimeout(timeout)
			.setPingTimeout(pingTimeout)
			.setRetryAttempts(retryAttempts)
			.setRetryInterval(retryInterval);
			
		return new RedissonSessionClient(config, getContainerClassLoader());<commit_msg>native epoll for single server config<commit_after>package com.crimsonhexagon.rsm.redisson;

import org.redisson.Config;
import org.redisson.codec.SerializationCodec;

import com.crimsonhexagon.rsm.RedisSessionClient;
import com.crimsonhexagon.rsm.RedisSessionManager;

/**
 * Manager for a single server using redisson
 *
 * @author <NAME>
 */
public class SingleServerSessionManager extends RedisSessionManager {
	private String endpoint = "localhost:6379";
	private int connectionPoolSize = 100;
	private int database = 0;
	private String password = <PASSWORD>;
	private int timeout = 60000;
	private int pingTimeout = 1000;
	private int retryAttempts = 20;
	private int retryInterval = 1000;
	
	/**
	 * Initialize the {@link RedisSessionClient}
	 * @throws ClassNotFoundException
	 * @throws InstantiationException
	 * @throws IllegalAccessException
	 */
	@Override
	protected RedisSessionClient buildClient() {
		Config config = new Config()
			.setUseLinuxNativeEpoll(System.getProperty("os.name").startsWith("Linux"));
		config.setCodec(new SerializationCodec());
		config.useSingleServer()
			.setAddress(getEndpoint())
			.setDatabase(database)
			.setConnectionPoolSize(connectionPoolSize)
			.setPassword(password)
			.setTimeout(timeout)
			.setPingTimeout(pingTimeout)
			.setRetryAttempts(retryAttempts)
			.setRetryInterval(retryInterval);
			
		return new RedissonSessionClient(config, getContainerClassLoader());
{'fraction_non_alphanumeric': 0.09216255442670537, 'fraction_numerical': 0.016690856313497822, 'mean_word_length': 5.533175355450237, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1376171', 'n_tokens_mistral': 880, 'n_tokens_neox': 789, 'n_words': 183}