Browse Source

DEC-15442 feat: 状态服务器适配适配腾讯云redis,finekit适配

master^2
Dylan.Liu 4 years ago
parent
commit
9219435899
  1. 16
      src/main/java/com/fanruan/api/cluster/state/FineCollectionsKit.java
  2. 2
      src/main/java/com/fanruan/api/cluster/state/RedisConfigKit.java
  3. 8
      src/main/java/com/fanruan/api/cluster/state/StateServerConfigKit.java
  4. 15
      src/main/java/com/fanruan/api/cluster/state/StoreTemplateKit.java

16
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();
}
}

2
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();
}
}

8
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<? extends Configuration> getConfigClass() {
return StateServerConfig.class;
}
}

15
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();
}
}
Loading…
Cancel
Save