add method

This commit is contained in:
Looly
2020-12-18 23:25:21 +08:00
parent 9070709dfc
commit 973c9c4227
3 changed files with 59 additions and 43 deletions

View File

@@ -9,6 +9,7 @@ import redis.clients.jedis.JedisPoolConfig;
import redis.clients.jedis.Protocol;
import java.io.Closeable;
import java.io.Serializable;
/**
* Jedis数据源
@@ -16,7 +17,7 @@ import java.io.Closeable;
* @author looly
* @since 3.2.3
*/
public class RedisDS implements Closeable, Serializable{
public class RedisDS implements Closeable, Serializable {
private static final long serialVersionUID = -5605411972456177456L;
/** 默认配置文件 */
public final static String REDIS_CONFIG_PATH = "config/redis.setting";
@@ -30,7 +31,7 @@ public class RedisDS implements Closeable, Serializable{
/**
* 创建RedisDS使用默认配置文件默认分组
*
* @return {@link RedisDS}
* @return RedisDS
*/
public static RedisDS create() {
return new RedisDS();
@@ -40,7 +41,7 @@ public class RedisDS implements Closeable, Serializable{
* 创建RedisDS使用默认配置文件
*
* @param group 配置文件中配置分组
* @return {@link RedisDS}
* @return RedisDS
*/
public static RedisDS create(String group) {
return new RedisDS(group);
@@ -51,7 +52,7 @@ public class RedisDS implements Closeable, Serializable{
*
* @param setting 配置文件
* @param group 配置文件中配置分组
* @return {@link RedisDS}
* @return RedisDS
*/
public static RedisDS create(Setting setting, String group) {
return new RedisDS(setting, group);