Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_57962205
redisson
提交
559c2866
R
redisson
项目概览
weixin_57962205
/
redisson
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redisson
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
559c2866
编写于
10月 27, 2020
作者:
N
Nikita Koksharov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
deprecated decodeInExecutor setting removed
上级
07f4e089
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
7 addition
and
57 deletion
+7
-57
redisson/src/main/java/org/redisson/client/RedisClientConfig.java
.../src/main/java/org/redisson/client/RedisClientConfig.java
+0
-11
redisson/src/main/java/org/redisson/client/handler/CommandDecoder.java
...main/java/org/redisson/client/handler/CommandDecoder.java
+3
-21
redisson/src/main/java/org/redisson/client/handler/CommandPubSubDecoder.java
...ava/org/redisson/client/handler/CommandPubSubDecoder.java
+2
-2
redisson/src/main/java/org/redisson/client/handler/RedisChannelInitializer.java
.../org/redisson/client/handler/RedisChannelInitializer.java
+2
-2
redisson/src/main/java/org/redisson/config/Config.java
redisson/src/main/java/org/redisson/config/Config.java
+0
-20
redisson/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java
...org/redisson/connection/MasterSlaveConnectionManager.java
+0
-1
未找到文件。
redisson/src/main/java/org/redisson/client/RedisClientConfig.java
浏览文件 @
559c2866
...
...
@@ -52,7 +52,6 @@ public class RedisClientConfig {
private
String
clientName
;
private
boolean
readOnly
;
private
boolean
keepPubSubOrder
=
true
;
private
boolean
decodeInExecutor
;
private
int
pingConnectionInterval
;
private
boolean
keepAlive
;
private
boolean
tcpNoDelay
;
...
...
@@ -97,7 +96,6 @@ public class RedisClientConfig {
this
.
sslKeystorePassword
=
config
.
sslKeystorePassword
;
this
.
resolverGroup
=
config
.
resolverGroup
;
this
.
sslHostname
=
config
.
sslHostname
;
this
.
decodeInExecutor
=
config
.
decodeInExecutor
;
}
public
NettyHook
getNettyHook
()
{
...
...
@@ -275,15 +273,6 @@ public class RedisClientConfig {
return
this
;
}
public
boolean
isDecodeInExecutor
()
{
return
decodeInExecutor
;
}
@Deprecated
public
RedisClientConfig
setDecodeInExecutor
(
boolean
decodeInExecutor
)
{
this
.
decodeInExecutor
=
decodeInExecutor
;
return
this
;
}
public
int
getPingConnectionInterval
()
{
return
pingConnectionInterval
;
}
...
...
redisson/src/main/java/org/redisson/client/handler/CommandDecoder.java
浏览文件 @
559c2866
...
...
@@ -68,10 +68,8 @@ public class CommandDecoder extends ReplayingDecoder<State> {
private
static
final
char
ZERO
=
'0'
;
final
ExecutorService
executor
;
private
final
boolean
decodeInExecutor
;
public
CommandDecoder
(
ExecutorService
executor
,
boolean
decodeInExecutor
)
{
this
.
decodeInExecutor
=
decodeInExecutor
;
public
CommandDecoder
(
ExecutorService
executor
)
{
this
.
executor
=
executor
;
}
...
...
@@ -116,23 +114,7 @@ public class CommandDecoder extends ReplayingDecoder<State> {
log
.
trace
(
"reply: {}, channel: {}, command: {}"
,
in
.
toString
(
0
,
in
.
writerIndex
(),
CharsetUtil
.
UTF_8
),
ctx
.
channel
(),
data
);
}
if
(
decodeInExecutor
&&
!(
data
instanceof
CommandsData
))
{
ByteBuf
copy
=
in
.
copy
(
in
.
readerIndex
(),
in
.
writerIndex
()
-
in
.
readerIndex
());
in
.
skipBytes
(
in
.
writerIndex
()
-
in
.
readerIndex
());
executor
.
execute
(()
->
{
state
(
new
State
());
try
{
decodeCommand
(
ctx
.
channel
(),
copy
,
data
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Unable to decode data in separate thread: "
+
LogHelper
.
toString
(
data
),
e
);
}
finally
{
copy
.
release
();
}
});
}
else
{
decodeCommand
(
ctx
.
channel
(),
in
,
data
);
}
decodeCommand
(
ctx
.
channel
(),
in
,
data
);
}
protected
void
sendNext
(
Channel
channel
,
QueueCommand
data
)
{
...
...
redisson/src/main/java/org/redisson/client/handler/CommandPubSubDecoder.java
浏览文件 @
559c2866
...
...
@@ -53,8 +53,8 @@ public class CommandPubSubDecoder extends CommandDecoder {
private
final
boolean
keepOrder
;
public
CommandPubSubDecoder
(
ExecutorService
executor
,
boolean
keepOrder
,
boolean
decodeInExecutor
)
{
super
(
executor
,
decodeInExecutor
);
public
CommandPubSubDecoder
(
ExecutorService
executor
,
boolean
keepOrder
)
{
super
(
executor
);
this
.
keepOrder
=
keepOrder
;
}
...
...
redisson/src/main/java/org/redisson/client/handler/RedisChannelInitializer.java
浏览文件 @
559c2866
...
...
@@ -95,9 +95,9 @@ public class RedisChannelInitializer extends ChannelInitializer<Channel> {
}
if
(
type
==
Type
.
PLAIN
)
{
ch
.
pipeline
().
addLast
(
new
CommandDecoder
(
config
.
getExecutor
()
,
config
.
isDecodeInExecutor
()
));
ch
.
pipeline
().
addLast
(
new
CommandDecoder
(
config
.
getExecutor
()));
}
else
{
ch
.
pipeline
().
addLast
(
new
CommandPubSubDecoder
(
config
.
getExecutor
(),
config
.
isKeepPubSubOrder
()
,
config
.
isDecodeInExecutor
()
));
ch
.
pipeline
().
addLast
(
new
CommandPubSubDecoder
(
config
.
getExecutor
(),
config
.
isKeepPubSubOrder
()));
}
ch
.
pipeline
().
addLast
(
new
ErrorsLoggingHandler
());
...
...
redisson/src/main/java/org/redisson/config/Config.java
浏览文件 @
559c2866
...
...
@@ -122,7 +122,6 @@ public class Config {
setMinCleanUpDelay
(
oldConf
.
getMinCleanUpDelay
());
setMaxCleanUpDelay
(
oldConf
.
getMaxCleanUpDelay
());
setCleanUpKeysAmount
(
oldConf
.
getCleanUpKeysAmount
());
setDecodeInExecutor
(
oldConf
.
isDecodeInExecutor
());
setUseScriptCache
(
oldConf
.
isUseScriptCache
());
setKeepPubSubOrder
(
oldConf
.
isKeepPubSubOrder
());
setLockWatchdogTimeout
(
oldConf
.
getLockWatchdogTimeout
());
...
...
@@ -717,25 +716,6 @@ public class Config {
return
useScriptCache
;
}
public
boolean
isDecodeInExecutor
()
{
return
decodeInExecutor
;
}
/**
* Defines whether to decode data by <code>codec</code> in executor's threads or netty's threads.
* If decoding data process takes long time and netty thread is used then `RedisTimeoutException` could arise time to time.
* <p>
* Default is <code>false</code>.
*
* @param decodeInExecutor - <code>true</code> to use executor's threads, <code>false</code> to use netty's threads.
* @return config
*/
@Deprecated
public
Config
setDecodeInExecutor
(
boolean
decodeInExecutor
)
{
this
.
decodeInExecutor
=
decodeInExecutor
;
return
this
;
}
public
int
getMinCleanUpDelay
()
{
return
minCleanUpDelay
;
}
...
...
redisson/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java
浏览文件 @
559c2866
...
...
@@ -470,7 +470,6 @@ public class MasterSlaveConnectionManager implements ConnectionManager {
.
setSslKeystore
(
config
.
getSslKeystore
())
.
setSslKeystorePassword
(
config
.
getSslKeystorePassword
())
.
setClientName
(
config
.
getClientName
())
.
setDecodeInExecutor
(
cfg
.
isDecodeInExecutor
())
.
setKeepPubSubOrder
(
cfg
.
isKeepPubSubOrder
())
.
setPingConnectionInterval
(
config
.
getPingConnectionInterval
())
.
setKeepAlive
(
config
.
isKeepAlive
())
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录