From 92194358995db8658abea8eae3fdb8aad2dc372b Mon Sep 17 00:00:00 2001 From: "Dylan.Liu" Date: Fri, 23 Oct 2020 14:08:28 +0800 Subject: [PATCH] =?UTF-8?q?DEC-15442=20feat:=20=E7=8A=B6=E6=80=81=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=99=A8=E9=80=82=E9=85=8D=E9=80=82=E9=85=8D=E8=85=BE?= =?UTF-8?q?=E8=AE=AF=E4=BA=91redis,finekit=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/cluster/state/FineCollectionsKit.java | 16 ++++++++++++++++ .../api/cluster/state/RedisConfigKit.java | 2 -- .../api/cluster/state/StateServerConfigKit.java | 8 ++++---- .../api/cluster/state/StoreTemplateKit.java | 15 +++++++++++++++ 4 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/fanruan/api/cluster/state/FineCollectionsKit.java create mode 100644 src/main/java/com/fanruan/api/cluster/state/StoreTemplateKit.java diff --git a/src/main/java/com/fanruan/api/cluster/state/FineCollectionsKit.java b/src/main/java/com/fanruan/api/cluster/state/FineCollectionsKit.java new file mode 100644 index 0000000..72c1794 --- /dev/null +++ b/src/main/java/com/fanruan/api/cluster/state/FineCollectionsKit.java @@ -0,0 +1,16 @@ +package com.fanruan.api.cluster.state; + +import com.fr.collections.FineCollections; +import com.fr.collections.api.FineCollectionClient; + +/** + * @author Dylan.Liu + * @version 10.0 + * Created by Dylan.Liu on 2020/10/16 + */ +public class FineCollectionsKit { + + public static FineCollectionClient getClient() { + return FineCollections.getInstance().getClient(); + } +} diff --git a/src/main/java/com/fanruan/api/cluster/state/RedisConfigKit.java b/src/main/java/com/fanruan/api/cluster/state/RedisConfigKit.java index 6a9407c..d977a80 100644 --- a/src/main/java/com/fanruan/api/cluster/state/RedisConfigKit.java +++ b/src/main/java/com/fanruan/api/cluster/state/RedisConfigKit.java @@ -14,7 +14,6 @@ public class RedisConfigKit { * @return Redis 里表名的统一的前缀 */ public static String getTableNamePrefix() { - return RedisConfig.getInstance().getTableNamePrefix(); } @@ -23,7 +22,6 @@ public class RedisConfigKit { * @return Redis 里过期 key 删除间隔时间 */ public static int getExpireStateRemoveInterval() { - return RedisConfig.getInstance().getExpireStateRemoveInterval(); } } diff --git a/src/main/java/com/fanruan/api/cluster/state/StateServerConfigKit.java b/src/main/java/com/fanruan/api/cluster/state/StateServerConfigKit.java index 1dd6be0..6339079 100644 --- a/src/main/java/com/fanruan/api/cluster/state/StateServerConfigKit.java +++ b/src/main/java/com/fanruan/api/cluster/state/StateServerConfigKit.java @@ -16,7 +16,6 @@ public class StateServerConfigKit { * @return 当前状态服务器类型 */ public static String getType() { - return StateServerConfig.getInstance().getType(); } @@ -25,16 +24,18 @@ public class StateServerConfigKit { * @param isShareMode 当前是否开启状态服务器 */ public static void setShareMode(boolean isShareMode) { - StateServerConfig.getInstance().setShareMode(isShareMode); } + public static boolean isShareMode() { + return StateServerConfig.getInstance().isShareMode(); + } + /** * 设置状态服务器类型 * @param type 状态服务器类型 */ public static void setType(String type) { - StateServerConfig.getInstance().setType(type); } @@ -43,7 +44,6 @@ public class StateServerConfigKit { * @return StateServerConfig 类对象 */ public static Class getConfigClass() { - return StateServerConfig.class; } } diff --git a/src/main/java/com/fanruan/api/cluster/state/StoreTemplateKit.java b/src/main/java/com/fanruan/api/cluster/state/StoreTemplateKit.java new file mode 100644 index 0000000..79727e2 --- /dev/null +++ b/src/main/java/com/fanruan/api/cluster/state/StoreTemplateKit.java @@ -0,0 +1,15 @@ +package com.fanruan.api.cluster.state; + +import com.fr.store.impl.StoreTemplate; + +/** + * @author Dylan.Liu + * @version 10.0 + * Created by Dylan.Liu on 2020/10/16 + */ +public class StoreTemplateKit { + + public static void close(){ + StoreTemplate.getInstance().close(); + } +}