From 056141604d2ff53eff0dc26e4509c582c8476a00 Mon Sep 17 00:00:00 2001 From: "Mars.Ma" Date: Fri, 6 Sep 2019 11:55:52 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-1198=20=E6=8C=89=E8=A6=81=E6=B1=82?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fanruan/api/cal/ParameterKit.java | 9 ---- .../fanruan/api/conf/ConfigurationKit.java | 51 ------------------- 2 files changed, 60 deletions(-) delete mode 100644 src/main/java/com/fanruan/api/conf/ConfigurationKit.java diff --git a/src/main/java/com/fanruan/api/cal/ParameterKit.java b/src/main/java/com/fanruan/api/cal/ParameterKit.java index c1e1b68..388726f 100644 --- a/src/main/java/com/fanruan/api/cal/ParameterKit.java +++ b/src/main/java/com/fanruan/api/cal/ParameterKit.java @@ -135,13 +135,4 @@ public class ParameterKit { return parameters; } - - /** - * 将ParameterProvider转化为Parameter - * @param providers 需要转换的ParameterProvider - * @return 转换后的Parameter - */ - public static Parameter[] providers2Parameter(ParameterProvider[] providers) { - return Parameter.providers2Parameter(providers); - } } diff --git a/src/main/java/com/fanruan/api/conf/ConfigurationKit.java b/src/main/java/com/fanruan/api/conf/ConfigurationKit.java deleted file mode 100644 index 43625ed..0000000 --- a/src/main/java/com/fanruan/api/conf/ConfigurationKit.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.fanruan.api.conf; - -import com.fr.config.ConfigContext; -import com.fr.config.Configuration; -import com.fr.config.holder.ConfigChangeListener; -import com.fr.transaction.Configurations; -import com.fr.transaction.ValidateProxy; -import com.fr.transaction.WorkerFacade; - -/** - * @author richie - * @version 10.0 - * Created by richie on 2019-08-30 - * 配置监听管理器 - */ -public class ConfigurationKit { - - /** - * 注册监听配置变化的监听器 - * - * @param listener 监听器 - */ - public static void registerListener(ConfigChangeListener listener) { - ValidateProxy.getInstance().getValidateManager().registerListener(listener); - } - - /** - * 保存配置 - * - * @param type 配置的类型 - * @param action 保存动作 - */ - public static void modify(Class type, Runner action) { - Configurations.modify(new WorkerFacade(type) { - @Override - public void run() { - action.run(); - } - }); - } - - /** - * 返回config实例,且config实例只存在一个 - * @param configuration Configuration类 - * @param - * @return config实例 - */ - public static T getConfigInstance(final Class configuration) { - return ConfigContext.getConfigInstance(configuration); - } -}