From 913e7cc45e633f8814730fda1d4c59874e24b1bf Mon Sep 17 00:00:00 2001 From: richie Date: Wed, 18 Sep 2019 14:04:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=AE=9E=E7=8E=B0=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E9=9D=9E=E5=9F=BA=E6=9C=AC=E7=B1=BB=E5=9E=8B=E7=9A=84?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.xml | 2 +- .../db/redis/core/RedisScriptTableData.java | 16 ++++ .../redis/core/RedisScriptTableDataModel.java | 7 +- .../db/redis/core/script/EngineType.java | 30 ++++++ .../fr/plugin/db/redis/help/RedisClient.java | 16 ++-- .../db/redis/help/RedisClientSelector.java | 6 +- .../db/redis/help/client/BaseRedisClient.java | 89 +++++++++++++++++- .../redis/help/client/RedisNashornClient.java | 60 +----------- .../db/redis/help/client/RedisV8Client.java | 63 +------------ .../plugin/db/redis/ui/RedisScriptPane.java | 48 +++++++++- .../db/redis/ui/RedisScriptTableDataPane.java | 6 +- .../com/fr/plugin/db/redis/images/help.png | Bin 0 -> 817 bytes .../plugin/db/redis/locale/redis.properties | 3 + .../db/redis/locale/redis_en_US.properties | 3 + .../db/redis/locale/redis_zh_CN.properties | 5 +- 15 files changed, 217 insertions(+), 137 deletions(-) create mode 100644 src/main/java/com/fr/plugin/db/redis/core/script/EngineType.java create mode 100644 src/main/resources/com/fr/plugin/db/redis/images/help.png diff --git a/plugin.xml b/plugin.xml index 8d09dbf..b67b0be 100755 --- a/plugin.xml +++ b/plugin.xml @@ -5,7 +5,7 @@ yes 7.0 10.0 - 2019-07-29 + 2019-02-29 richie database = HolderKit.obj(null, Connection.class); private Conf dbIndex = XmlHolderKit.obj(new NumberOrderValue(0), OrderValue.class, OrderValue.XML_TAG); private Conf script = HolderKit.simple(StringKit.EMPTY); + private Conf engineType = HolderKit.simple(EngineType.JAVA.getType()); public void setDatabase(Connection c) { this.database.set(c); @@ -52,6 +54,14 @@ public class RedisScriptTableData extends BaseTableData { this.dbIndex.set(dbIndex); } + public EngineType getEngineType() { + return EngineType.parse(engineType.get()); + } + + public void setEngineType(EngineType engineType) { + this.engineType.set(engineType.getType()); + } + public String getScript() { return script.get(); } @@ -80,7 +90,9 @@ public class RedisScriptTableData extends BaseTableData { RedisDatabaseConnection rc = ConnectionKit.getConnection(name, RedisDatabaseConnection.class); if (rc != null) { OrderValue orderValue = dbIndex.get(); + EngineType engineType = getEngineType(); DataModel model = new RedisScriptTableDataModel(rc, + engineType, orderValue == null ? 0 : orderValue.toIndex(calculator, ps), RedisUtils.calculateQuery(script.get(), ps), rowCount); @@ -113,6 +125,8 @@ public class RedisScriptTableData extends BaseTableData { if (isNotNullValue(tmpVal)) { this.setScript(tmpVal); } + } else if ("ScriptAttr".equals(tmpName)) { + setEngineType(EngineType.parse(reader.getAttrAsInt("engineType", 0))); } } } @@ -125,6 +139,7 @@ public class RedisScriptTableData extends BaseTableData { XmlKit.writeXMLConnection(writer, this.database.get()); } writer.startTAG("Script").textNode(getScript()).end(); + writer.startTAG("ScriptAttr").attr("engineType", engineType.get()).end(); } private boolean isNotNullValue(String value) { @@ -137,6 +152,7 @@ public class RedisScriptTableData extends BaseTableData { cloned.database = (Conf) database.clone(); cloned.script = (Conf) script.clone(); cloned.dbIndex = (Conf) dbIndex.clone(); + cloned.engineType = (Conf) engineType.clone(); return cloned; } } diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableDataModel.java b/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableDataModel.java index 863f3e1..3ff402d 100644 --- a/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableDataModel.java +++ b/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableDataModel.java @@ -2,6 +2,7 @@ package com.fr.plugin.db.redis.core; import com.fanruan.api.data.open.BaseDataModel; import com.fr.plugin.db.redis.core.emb.Redis; +import com.fr.plugin.db.redis.core.script.EngineType; import com.fr.plugin.db.redis.help.RedisClient; import com.fr.plugin.db.redis.help.RedisClientSelector; import com.fr.plugin.db.redis.help.client.SimpleDataModel; @@ -17,14 +18,16 @@ import java.util.List; public class RedisScriptTableDataModel extends BaseDataModel { private RedisDatabaseConnection mc; + private EngineType engineType; private String script; private int dbIndex; private int rowCount; private List> data = new ArrayList>(); private String[] columnNames = null; - public RedisScriptTableDataModel(RedisDatabaseConnection mc, int dbIndex, String script, int rowCount) { + public RedisScriptTableDataModel(RedisDatabaseConnection mc, EngineType engineType, int dbIndex, String script, int rowCount) { this.mc = mc; + this.engineType = engineType; this.script = script; this.dbIndex = dbIndex; this.rowCount = rowCount; @@ -36,7 +39,7 @@ public class RedisScriptTableDataModel extends BaseDataModel { } Redis redis = mc.createRedisClient(); redis.getClient().select(dbIndex); - RedisClient redisClient = RedisClientSelector.select(redis); + RedisClient redisClient = RedisClientSelector.select(redis, engineType); SimpleDataModel simple = redisClient.build(redis, script, rowCount); if (simple != null) { this.columnNames = simple.getColumnNames(); diff --git a/src/main/java/com/fr/plugin/db/redis/core/script/EngineType.java b/src/main/java/com/fr/plugin/db/redis/core/script/EngineType.java new file mode 100644 index 0000000..61942cb --- /dev/null +++ b/src/main/java/com/fr/plugin/db/redis/core/script/EngineType.java @@ -0,0 +1,30 @@ +package com.fr.plugin.db.redis.core.script; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-09-18 + */ +public enum EngineType { + + V8(0), JAVA(1); + + private int index; + + EngineType(int index) { + this.index = index; + } + + public int getType() { + return index; + } + + public static EngineType parse(int type) { + for (EngineType engineType : values()) { + if (engineType.index == type) { + return engineType; + } + } + return V8; + } +} diff --git a/src/main/java/com/fr/plugin/db/redis/help/RedisClient.java b/src/main/java/com/fr/plugin/db/redis/help/RedisClient.java index 6361311..5791f6d 100644 --- a/src/main/java/com/fr/plugin/db/redis/help/RedisClient.java +++ b/src/main/java/com/fr/plugin/db/redis/help/RedisClient.java @@ -8,7 +8,7 @@ import com.fr.plugin.db.redis.help.client.SimpleDataModel; * @version 10.0 * Created by richie on 2019-08-26 */ -public interface RedisClient { +public interface RedisClient { SimpleDataModel build(Redis redis, String query, int limit); @@ -19,23 +19,23 @@ public interface RedisClient { String hget(String key, String field); @ScriptBridge - A hkeys(String key); + String hkeys(String key); @ScriptBridge - A hmget(String key, String... fields); + String hmget(String key, String... fields); @ScriptBridge - O hgetAll(String key); + String hgetAll(String key); @ScriptBridge - A keys(String pattern); + String keys(String pattern); @ScriptBridge - A lrange(String key, long start, long end); + String lrange(String key, long start, long end); @ScriptBridge - A mget(A keys); + String mget(A keys); @ScriptBridge - A smembers(String key); + String smembers(String key); } diff --git a/src/main/java/com/fr/plugin/db/redis/help/RedisClientSelector.java b/src/main/java/com/fr/plugin/db/redis/help/RedisClientSelector.java index c3aa5b6..7e05b60 100644 --- a/src/main/java/com/fr/plugin/db/redis/help/RedisClientSelector.java +++ b/src/main/java/com/fr/plugin/db/redis/help/RedisClientSelector.java @@ -2,6 +2,7 @@ package com.fr.plugin.db.redis.help; import com.eclipsesource.v8.V8; import com.fr.plugin.db.redis.core.emb.Redis; +import com.fr.plugin.db.redis.core.script.EngineType; import com.fr.plugin.db.redis.help.client.RedisNashornClient; import com.fr.plugin.db.redis.help.client.RedisV8Client; @@ -25,7 +26,10 @@ public class RedisClientSelector { return true; } - public static RedisClient select(Redis redis) { + public static RedisClient select(Redis redis, EngineType engineType) { + if (engineType == EngineType.JAVA) { + return new RedisNashornClient(redis.getClient()); + } if (SUPPORT_J2V8) { return new RedisV8Client(redis.getClient()); } else { diff --git a/src/main/java/com/fr/plugin/db/redis/help/client/BaseRedisClient.java b/src/main/java/com/fr/plugin/db/redis/help/client/BaseRedisClient.java index 6815115..9d809b8 100644 --- a/src/main/java/com/fr/plugin/db/redis/help/client/BaseRedisClient.java +++ b/src/main/java/com/fr/plugin/db/redis/help/client/BaseRedisClient.java @@ -1,18 +1,24 @@ package com.fr.plugin.db.redis.help.client; import com.fanruan.api.log.LogKit; - +import com.fr.json.JSON; +import com.fr.json.JSONFactory; import com.fr.plugin.db.redis.core.accessor.EmbedRedis; -import com.fr.plugin.db.redis.help.ScriptBridge; import com.fr.plugin.db.redis.help.RedisClient; -import redis.clients.jedis.Jedis; +import com.fr.plugin.db.redis.help.ScriptBridge; + +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; /** * @author richie * @version 10.0 * Created by richie on 2019-08-26 */ -public abstract class BaseRedisClient implements RedisClient { +public abstract class BaseRedisClient implements RedisClient { EmbedRedis jedis; @@ -40,4 +46,79 @@ public abstract class BaseRedisClient implements RedisClient { } } + @Override + @ScriptBridge + public String hkeys(String key) { + long start = System.currentTimeMillis(); + Set set = jedis.keys(key); + LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); + return object2JSONString(set); + } + + @Override + @ScriptBridge + public String hmget(String key, String... fields) { + long start = System.currentTimeMillis(); + List list = jedis.hmget(key, fields); + LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); + return object2JSONString(list); + } + + @Override + @ScriptBridge + public String hgetAll(String key) { + long start = System.currentTimeMillis(); + Map map = jedis.hgetAll(key); + LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); + return object2JSONString(map); + } + + @Override + @ScriptBridge + public String keys(String pattern) { + long start = System.currentTimeMillis(); + Set set = jedis.keys(pattern); + LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); + return object2JSONString(set); + } + + @Override + @ScriptBridge + public String lrange(String key, long start, long end) { + long start0 = System.currentTimeMillis(); + List list = jedis.lrange(key, start, end); + LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start0); + return object2JSONString(list); + } + + @Override + @ScriptBridge + public String smembers(String key) { + long start = System.currentTimeMillis(); + Set set = jedis.smembers(key); + LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); + return object2JSONString(set); + } + + /** + * 将集合输出为JSON格式的字符串,便于JS和Java互传数据 + * + * @param collection 集合 + * @return 字符串 + */ + String object2JSONString(Collection collection) { + return JSONFactory.createJSON(collection).toString(); + } + + /** + * 将集合输出为JSON格式的字符串,便于JS和Java互传数据 + * + * @param map 集合 + * @return 字符串 + */ + String object2JSONString(Map map) { + Map newMap = new TreeMap(); + newMap.putAll(map); + return JSONFactory.createJSON(JSON.OBJECT, newMap).toString(); + } } diff --git a/src/main/java/com/fr/plugin/db/redis/help/client/RedisNashornClient.java b/src/main/java/com/fr/plugin/db/redis/help/client/RedisNashornClient.java index e79d6bc..1b720d1 100644 --- a/src/main/java/com/fr/plugin/db/redis/help/client/RedisNashornClient.java +++ b/src/main/java/com/fr/plugin/db/redis/help/client/RedisNashornClient.java @@ -23,7 +23,7 @@ import java.util.TreeMap; * @version 10.0 * Created by richie on 2019-08-26 */ -public class RedisNashornClient extends BaseRedisClient> { +public class RedisNashornClient extends BaseRedisClient { private static final String PREPARE_SCRIPT = "function unique(array) {var res = [];for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {for (var j = 0, resLen = res.length; j < resLen; j++ ) {if (array[i] === res[j]) {break;}} if (j === resLen) {res.push(array[i])}} return res;}\n" + @@ -38,52 +38,7 @@ public class RedisNashornClient extends BaseRedisClient set = jedis.keys(key); - LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); - return set.toArray(new String[0]); - } - - @Override - @ScriptBridge - public Object[] hmget(String key, String... fields) { - long start = System.currentTimeMillis(); - List list = jedis.hmget(key, fields); - LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); - return list.toArray(new String[0]); - } - - @Override - @ScriptBridge - public Map hgetAll(String key) { - long start = System.currentTimeMillis(); - Map map = jedis.hgetAll(key); - LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); - return new TreeMap(map); - } - - @Override - @ScriptBridge - public Object[] keys(String pattern) { - long start = System.currentTimeMillis(); - Set set = jedis.keys(pattern); - LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); - return set.toArray(new String[0]); - } - - @Override - @ScriptBridge - public Object[] lrange(String key, long start, long end) { - long start0 = System.currentTimeMillis(); - List list = jedis.lrange(key, start, end); - LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start0); - return list.toArray(new String[0]); - } - - @Override - @ScriptBridge - public Object[] mget(Object[] keys) { + public String mget(Object[] keys) { long start = System.currentTimeMillis(); int len = keys.length; String[] parameters = new String[len]; @@ -92,16 +47,7 @@ public class RedisNashornClient extends BaseRedisClient list = jedis.mget(parameters); LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); - return list.toArray(new String[0]); - } - - @Override - @ScriptBridge - public Object[] smembers(String key) { - long start = System.currentTimeMillis(); - Set set = jedis.smembers(key); - LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); - return set.toArray(new String[0]); + return object2JSONString(list); } @Override diff --git a/src/main/java/com/fr/plugin/db/redis/help/client/RedisV8Client.java b/src/main/java/com/fr/plugin/db/redis/help/client/RedisV8Client.java index 4bfc051..5ac3b86 100644 --- a/src/main/java/com/fr/plugin/db/redis/help/client/RedisV8Client.java +++ b/src/main/java/com/fr/plugin/db/redis/help/client/RedisV8Client.java @@ -3,7 +3,6 @@ package com.fr.plugin.db.redis.help.client; import com.eclipsesource.v8.V8; import com.eclipsesource.v8.V8Array; import com.eclipsesource.v8.V8Object; -import com.eclipsesource.v8.utils.V8ObjectUtils; import com.fanruan.api.log.LogKit; import com.fr.base.TableData; import com.fr.plugin.db.redis.core.accessor.EmbedRedis; @@ -14,15 +13,13 @@ import com.fr.plugin.db.redis.util.RedisUtils; import java.util.ArrayList; import java.util.List; -import java.util.Map; -import java.util.Set; /** * @author richie * @version 10.0 * Created by richie on 2019-03-18 */ -public class RedisV8Client extends BaseRedisClient { +public class RedisV8Client extends BaseRedisClient { private V8 v8; @@ -33,52 +30,7 @@ public class RedisV8Client extends BaseRedisClient { @Override @ScriptBridge - public V8Array hkeys(String key) { - long start = System.currentTimeMillis(); - Set set = jedis.hkeys(key); - LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); - return V8ObjectUtils.toV8Array(v8, new ArrayList(set)); - } - - @Override - @ScriptBridge - public V8Array hmget(String key, String... fields) { - long start = System.currentTimeMillis(); - List list = jedis.hmget(key, fields); - LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); - return V8ObjectUtils.toV8Array(v8, list); - } - - @Override - @ScriptBridge - public V8Object hgetAll(String key) { - long start = System.currentTimeMillis(); - Map map = jedis.hgetAll(key); - LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); - return V8ObjectUtils.toV8Object(v8, map); - } - - @Override - @ScriptBridge - public V8Array keys(String pattern) { - long start = System.currentTimeMillis(); - Set set = jedis.keys(pattern); - LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); - return V8ObjectUtils.toV8Array(v8, new ArrayList(set)); - } - - @Override - @ScriptBridge - public V8Array lrange(String key, long start, long end) { - long start0 = System.currentTimeMillis(); - List list = jedis.lrange(key, start, end); - LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start0); - return V8ObjectUtils.toV8Array(v8, list); - } - - @Override - @ScriptBridge - public V8Array mget(V8Array keys) { + public String mget(V8Array keys) { long start = System.currentTimeMillis(); int len = keys.length(); String[] parameters = new String[len]; @@ -88,16 +40,7 @@ public class RedisV8Client extends BaseRedisClient { List list = jedis.mget(parameters); LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); keys.release(); - return V8ObjectUtils.toV8Array(v8, list); - } - - @Override - @ScriptBridge - public V8Array smembers(String key) { - long start = System.currentTimeMillis(); - Set set = jedis.smembers(key); - LogKit.info("Fetch data from redis spend time {} ms.", System.currentTimeMillis() - start); - return V8ObjectUtils.toV8Array(v8, new ArrayList(set)); + return object2JSONString(list); } @Override diff --git a/src/main/java/com/fr/plugin/db/redis/ui/RedisScriptPane.java b/src/main/java/com/fr/plugin/db/redis/ui/RedisScriptPane.java index 643c8c7..4bc0144 100644 --- a/src/main/java/com/fr/plugin/db/redis/ui/RedisScriptPane.java +++ b/src/main/java/com/fr/plugin/db/redis/ui/RedisScriptPane.java @@ -1,17 +1,27 @@ package com.fr.plugin.db.redis.ui; import com.fanruan.api.design.DesignKit; +import com.fanruan.api.design.ui.component.UIButton; +import com.fanruan.api.design.ui.component.UIDictionaryComboBox; import com.fanruan.api.design.ui.component.UILabel; import com.fanruan.api.design.ui.component.code.SyntaxConstants; import com.fanruan.api.design.ui.component.code.UISyntaxTextArea; import com.fanruan.api.design.ui.container.BasicPane; import com.fanruan.api.design.ui.editor.ValueEditorPane; import com.fanruan.api.design.ui.layout.TableLayoutKit; +import com.fanruan.api.design.util.GUICoreKit; +import com.fanruan.api.log.LogKit; +import com.fanruan.api.util.IOKit; import com.fr.plugin.db.redis.core.order.OrderValue; +import com.fr.plugin.db.redis.core.script.EngineType; import com.fr.plugin.db.redis.ui.value.IndexValuePaneFactory; import com.fr.plugin.db.redis.util.RedisDesignUtils; import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.IOException; +import java.net.URI; /** * @author richie @@ -21,6 +31,7 @@ import java.awt.*; public class RedisScriptPane extends BasicPane { private ValueEditorPane dbIndexEditor; + private UIDictionaryComboBox engineTypeComboBox; private UISyntaxTextArea scriptTextPane; public RedisScriptPane() { @@ -31,16 +42,41 @@ public class RedisScriptPane extends BasicPane { dbIndexEditor = IndexValuePaneFactory.createValueEditorPane(); + engineTypeComboBox = new UIDictionaryComboBox( + new EngineType[]{ + EngineType.V8, EngineType.JAVA + }, + new String[]{ + DesignKit.i18nText("Plugin-Redis_Script_Engine_Type_V8"), + DesignKit.i18nText("Plugin-Redis_Script_Engine_Type_Default") + } + ); + + UIButton helpButton = new UIButton(); + helpButton.setIcon(IOKit.readIcon("/com/fr/plugin/db/redis/images/help.png")); + helpButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + try { + Desktop.getDesktop().browse(URI.create("https://help.finereport.com/doc-view-1957.html")); + } catch (IOException ex) { + LogKit.error(ex.getMessage(), ex); + } + } + }); + Component[][] coms = new Component[][]{ {new UILabel(DesignKit.i18nText("Plugin-Redis_DB_Index") + ":"), dbIndexEditor}, + {new UILabel(DesignKit.i18nText("Plugin-Redis_Script_Engine_Type") + ":"), + GUICoreKit.createBorderLayoutPane(engineTypeComboBox, BorderLayout.CENTER, helpButton, BorderLayout.EAST)}, {new UILabel(DesignKit.i18nText("Plugin-Redis_Script_Query_Text") + ":"), - RedisDesignUtils.createConditionTextPane(scriptTextPane, SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT, 350)}, + RedisDesignUtils.createConditionTextPane(scriptTextPane, SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT, 300)}, }; double p = TableLayoutKit.PREFERRED; double f = TableLayoutKit.FILL; - double[] rowSize = {p, p, p}; + double[] rowSize = {p, p, p, p}; double[] columnSize = {p, f}; add(TableLayoutKit.createTableLayoutPane(coms, rowSize, columnSize)); @@ -60,6 +96,14 @@ public class RedisScriptPane extends BasicPane { dbIndexEditor.populate(orderValue); } + public EngineType getEngineType() { + return engineTypeComboBox.getSelectedItem(); + } + + public void setEngineType(EngineType engineType) { + this.engineTypeComboBox.setSelectedItem(engineType); + } + public String getScript() { return scriptTextPane.getText(); } diff --git a/src/main/java/com/fr/plugin/db/redis/ui/RedisScriptTableDataPane.java b/src/main/java/com/fr/plugin/db/redis/ui/RedisScriptTableDataPane.java index fad2521..3658fbc 100644 --- a/src/main/java/com/fr/plugin/db/redis/ui/RedisScriptTableDataPane.java +++ b/src/main/java/com/fr/plugin/db/redis/ui/RedisScriptTableDataPane.java @@ -33,7 +33,7 @@ public class RedisScriptTableDataPane extends RedisBaseTableDataPanep zB#L2RsDuPaR3NA@l^`v&qNPz0PVCrm>}UJEcQ1pbingD0wsX#KzH@}zZgz34B*+p< z9z)c;h=8bXMWlN1%nOy<`ErYR;q>uhFW$Ohe`zkU2%MP?V*%2N}i zzYaeB2;W_3Gd1p0dHZ3kwdA?OT8ndz8}*czPFzPsaL$snYE5hNJ$iiKv6aJ5&K_Rh z$mpex-JT^56!lidi8D1EuxHXE_JtoW_i6P&X^m(d=IP*)@dIy3nTYLn7eqjW55BCC zJ0Y{6weakL80Q?DyN*se%q-LqqT5Hz=t!YlYo^0A1p29?+sP5Fd0@il&0}L&YdQBv zpGFV-$N*4KkaTs)SO>j9j&-oTlaV8MzD9eBcV3ww4umWJW}N)GLlAo?HGEt#aMT+H zGe~m;$L4m56T$cjWfThs?_y@sV6EfB?-NpG2m*!D3V@MF-; zse260Ih=D`+H?e=A&5M}*kfeGBMd;asTxFm(Q5B56~j@wR#0k)%FhY=rhT>&FuukM zG=At|d`)=_{#UzQe{cWl|26*s`ff5j^jFQo00000NkvXXu0mjf`l^jP literal 0 HcmV?d00001 diff --git a/src/main/resources/com/fr/plugin/db/redis/locale/redis.properties b/src/main/resources/com/fr/plugin/db/redis/locale/redis.properties index 851d8ef..2d83961 100755 --- a/src/main/resources/com/fr/plugin/db/redis/locale/redis.properties +++ b/src/main/resources/com/fr/plugin/db/redis/locale/redis.properties @@ -35,3 +35,6 @@ Plugin-Redis_Pool_Timeout=Timeout Plugin-Redis_Proxy_Description=Only Support SSH Protocol Plugin-Redis_Connect_Cluster_Description=Connect Cluster Description Plugin-Redis_Cluster_Config_Description=Input multiple hosts with commas separator. +Plugin-Redis_Script_Engine_Type=Script Engine Type +Plugin-Redis_Script_Engine_Type_Default=Default +Plugin-Redis_Script_Engine_Type_V8=V8 diff --git a/src/main/resources/com/fr/plugin/db/redis/locale/redis_en_US.properties b/src/main/resources/com/fr/plugin/db/redis/locale/redis_en_US.properties index 252a0d1..2f69c39 100755 --- a/src/main/resources/com/fr/plugin/db/redis/locale/redis_en_US.properties +++ b/src/main/resources/com/fr/plugin/db/redis/locale/redis_en_US.properties @@ -35,3 +35,6 @@ Plugin-Redis_Pool_Timeout=Timeout Plugin-Redis_Proxy_Description=Only Support SSH Protocol Plugin-Redis_Connect_Cluster_Description=Connect Cluster Description Plugin-Redis_Cluster_Config_Description=Input multiple hosts with commas separator. +Plugin-Redis_Script_Engine_Type=Script Engine Type +Plugin-Redis_Script_Engine_Type_Default=Default +Plugin-Redis_Script_Engine_Type_V8=V8 diff --git a/src/main/resources/com/fr/plugin/db/redis/locale/redis_zh_CN.properties b/src/main/resources/com/fr/plugin/db/redis/locale/redis_zh_CN.properties index 2b853cc..eb12060 100755 --- a/src/main/resources/com/fr/plugin/db/redis/locale/redis_zh_CN.properties +++ b/src/main/resources/com/fr/plugin/db/redis/locale/redis_zh_CN.properties @@ -35,4 +35,7 @@ Plugin-Redis_Pool_Max_Idle=\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5\u6570 Plugin-Redis_Pool_Timeout=\u8D85\u65F6\u65F6\u95F4 Plugin-Redis_Proxy_Description=\u8DF3\u677F\u670D\u52A1\u5668\u8FDE\u63A5\u4EC5\u652F\u6301ssh\u534F\u8BAE\uFF08\u6CE8\u610F\uFF1A\u542F\u7528\u8DF3\u677F\u670D\u52A1\u5668\u5C06\u65E0\u6CD5\u4F7F\u7528\u8FDE\u63A5\u6C60\uFF09 Plugin-Redis_Connect_Cluster_Description=\u8FDE\u63A5\u96C6\u7FA4\u914D\u7F6E\u8BF4\u660E -Plugin-Redis_Cluster_Config_Description=1\u3001\u4F7F\u7528\u9017\u53F7\u5206\u5272\u96C6\u7FA4\u4E2D\u7684\u591A\u4E2A\u6570\u636E\u5E93\u5730\u5740\u548C\u7AEF\u53E3\uFF0C\u5FC5\u987B\u8981\u6C42\u5730\u5740\u548C\u7AEF\u53E3\u6570\u91CF\u4E00\u81F4\uFF1B\n2\u3001\u6240\u6709redis\u8282\u70B9\u7684\u5BC6\u7801\u5FC5\u987B\u76F8\u540C;\n3\u3001\u8FDE\u63A5\u96C6\u7FA4\u7684\u65F6\u5019\u65E0\u6CD5\u4F7F\u7528\u8DF3\u677F\u673A\u3002 \ No newline at end of file +Plugin-Redis_Cluster_Config_Description=1\u3001\u4F7F\u7528\u9017\u53F7\u5206\u5272\u96C6\u7FA4\u4E2D\u7684\u591A\u4E2A\u6570\u636E\u5E93\u5730\u5740\u548C\u7AEF\u53E3\uFF0C\u5FC5\u987B\u8981\u6C42\u5730\u5740\u548C\u7AEF\u53E3\u6570\u91CF\u4E00\u81F4\uFF1B\n2\u3001\u6240\u6709redis\u8282\u70B9\u7684\u5BC6\u7801\u5FC5\u987B\u76F8\u540C;\n3\u3001\u8FDE\u63A5\u96C6\u7FA4\u7684\u65F6\u5019\u65E0\u6CD5\u4F7F\u7528\u8DF3\u677F\u673A\u3002 +Plugin-Redis_Script_Engine_Type=\u811A\u672C\u5F15\u64CE +Plugin-Redis_Script_Engine_Type_Default=\u9ED8\u8BA4 +Plugin-Redis_Script_Engine_Type_V8=V8\u9AD8\u901F\u5F15\u64CE \ No newline at end of file