Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Kwan的解忧杂货铺@新空间代码工作室
Rocketmq
提交
182ca623
R
Rocketmq
项目概览
Kwan的解忧杂货铺@新空间代码工作室
/
Rocketmq
与 Fork 源项目一致
Fork自
Apache RocketMQ / Rocketmq
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rocketmq
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
未验证
提交
182ca623
编写于
1月 11, 2019
作者:
H
Heng Du
提交者:
GitHub
1月 11, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #682 from zongtanghu/snode
resolve the codestyle issue.
上级
149fc42b
2fae8fba
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
36 addition
and
39 deletion
+36
-39
remoting/src/main/java/org/apache/rocketmq/remoting/RemotingClientFactory.java
...a/org/apache/rocketmq/remoting/RemotingClientFactory.java
+1
-4
remoting/src/main/java/org/apache/rocketmq/remoting/RemotingServerFactory.java
...a/org/apache/rocketmq/remoting/RemotingServerFactory.java
+0
-3
remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java
...a/org/apache/rocketmq/remoting/common/RemotingHelper.java
+1
-8
remoting/src/main/java/org/apache/rocketmq/remoting/netty/CodecHelper.java
.../java/org/apache/rocketmq/remoting/netty/CodecHelper.java
+16
-2
remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
...apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
+1
-1
remoting/src/main/java/org/apache/rocketmq/remoting/transport/http2/Http2ClientImpl.java
...he/rocketmq/remoting/transport/http2/Http2ClientImpl.java
+1
-1
remoting/src/main/java/org/apache/rocketmq/remoting/transport/http2/Http2ServerImpl.java
...he/rocketmq/remoting/transport/http2/Http2ServerImpl.java
+16
-19
remoting/src/main/java/org/apache/rocketmq/remoting/util/ServiceProvider.java
...va/org/apache/rocketmq/remoting/util/ServiceProvider.java
+0
-1
未找到文件。
remoting/src/main/java/org/apache/rocketmq/remoting/RemotingClientFactory.java
浏览文件 @
182ca623
...
...
@@ -17,16 +17,13 @@
package
org.apache.rocketmq.remoting
;
import
java.util.Map
;
import
org.apache.rocketmq.logging.InternalLogger
;
import
org.apache.rocketmq.logging.InternalLoggerFactory
;
import
org.apache.rocketmq.remoting.common.RemotingHelper
;
import
org.apache.rocketmq.remoting.common.RemotingUtil
;
import
org.apache.rocketmq.remoting.util.ServiceProvider
;
public
class
RemotingClientFactory
{
private
static
RemotingClientFactory
instance
=
new
RemotingClientFactory
();
public
static
RemotingClientFactory
getInstance
(){
public
static
RemotingClientFactory
getInstance
()
{
return
instance
;
}
...
...
remoting/src/main/java/org/apache/rocketmq/remoting/RemotingServerFactory.java
浏览文件 @
182ca623
...
...
@@ -17,9 +17,6 @@
package
org.apache.rocketmq.remoting
;
import
java.util.Map
;
import
org.apache.rocketmq.logging.InternalLogger
;
import
org.apache.rocketmq.logging.InternalLoggerFactory
;
import
org.apache.rocketmq.remoting.common.RemotingHelper
;
import
org.apache.rocketmq.remoting.common.RemotingUtil
;
import
org.apache.rocketmq.remoting.util.ServiceProvider
;
...
...
remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java
浏览文件 @
182ca623
...
...
@@ -17,18 +17,11 @@
package
org.apache.rocketmq.remoting.common
;
import
io.netty.channel.Channel
;
import
org.apache.rocketmq.remoting.exception.RemotingConnectException
;
import
org.apache.rocketmq.remoting.exception.RemotingSendRequestException
;
import
org.apache.rocketmq.remoting.exception.RemotingTimeoutException
;
import
org.apache.rocketmq.logging.InternalLogger
;
import
org.apache.rocketmq.logging.InternalLoggerFactory
;
import
org.apache.rocketmq.remoting.protocol.RemotingCommand
;
import
java.io.IOException
;
import
java.net.InetSocketAddress
;
import
java.net.SocketAddress
;
import
java.nio.ByteBuffer
;
import
java.nio.channels.SocketChannel
;
public
class
RemotingHelper
{
public
static
final
String
ROCKETMQ_REMOTING
=
"RocketmqRemoting"
;
...
...
remoting/src/main/java/org/apache/rocketmq/remoting/netty/CodecHelper.java
浏览文件 @
182ca623
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.apache.rocketmq.remoting.netty
;
import
java.lang.annotation.Annotation
;
...
...
@@ -10,8 +26,6 @@ import org.apache.rocketmq.remoting.CommandCustomHeader;
import
org.apache.rocketmq.remoting.annotation.CFNotNull
;
import
org.apache.rocketmq.remoting.exception.RemotingCommandException
;
import
org.apache.rocketmq.remoting.protocol.RemotingCommand
;
import
org.apache.rocketmq.remoting.serialize.RemotingSerializable
;
import
org.apache.rocketmq.remoting.serialize.RocketMQSerializable
;
import
org.apache.rocketmq.remoting.serialize.SerializeType
;
import
org.apache.rocketmq.remoting.serialize.Serializer
;
import
org.apache.rocketmq.remoting.serialize.SerializerFactory
;
...
...
remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
浏览文件 @
182ca623
...
...
@@ -296,7 +296,7 @@ public abstract class NettyRemotingAbstract {
responseFuture
.
release
();
}
}
else
{
log
.
warn
(
"receive response, but not matched any request: {}
,
cmd: {}"
,
RemotingHelper
.
parseChannelRemoteAddr
(
ctx
.
channel
()),
cmd
);
log
.
warn
(
"receive response, but not matched any request: {}
,
cmd: {}"
,
RemotingHelper
.
parseChannelRemoteAddr
(
ctx
.
channel
()),
cmd
);
}
}
...
...
remoting/src/main/java/org/apache/rocketmq/remoting/transport/http2/Http2ClientImpl.java
浏览文件 @
182ca623
...
...
@@ -75,7 +75,7 @@ public class Http2ClientImpl extends NettyRemotingClientAbstract implements Remo
init
(
clientConfig
,
channelEventListener
);
}
public
Http2ClientImpl
(){
public
Http2ClientImpl
()
{
super
();
}
...
...
remoting/src/main/java/org/apache/rocketmq/remoting/transport/http2/Http2ServerImpl.java
浏览文件 @
182ca623
...
...
@@ -208,26 +208,23 @@ public class Http2ServerImpl extends NettyRemotingServerAbstract implements Remo
final
ChannelGroup
channels
=
new
DefaultChannelGroup
(
GlobalEventExecutor
.
INSTANCE
);
this
.
serverBootstrap
.
group
(
this
.
bossGroup
,
this
.
ioGroup
).
channel
(
socketChannelClass
).
childHandler
(
new
ChannelInitializer
<
SocketChannel
>()
{
@Override
public
void
initChannel
(
SocketChannel
ch
)
throws
Exception
{
channels
.
add
(
ch
);
ChannelPipeline
cp
=
ch
.
pipeline
();
cp
.
addLast
(
ChannelStatisticsHandler
.
NAME
,
new
ChannelStatisticsHandler
(
channels
));
cp
.
addLast
(
workerGroup
,
Http2Handler
.
newHandler
(
true
),
new
NettyEncoder
(),
new
NettyDecoder
(),
new
IdleStateHandler
(
serverConfig
.
getConnectionChannelReaderIdleSeconds
(),
serverConfig
.
getConnectionChannelWriterIdleSeconds
(),
serverConfig
.
getServerChannelMaxIdleTimeSeconds
()),
new
NettyConnectManageHandler
(),
new
NettyServerHandler
());
}
});
@Override
public
void
initChannel
(
SocketChannel
ch
)
throws
Exception
{
channels
.
add
(
ch
);
ChannelPipeline
cp
=
ch
.
pipeline
();
cp
.
addLast
(
ChannelStatisticsHandler
.
NAME
,
new
ChannelStatisticsHandler
(
channels
));
cp
.
addLast
(
workerGroup
,
Http2Handler
.
newHandler
(
true
),
new
NettyEncoder
(),
new
NettyDecoder
(),
new
IdleStateHandler
(
serverConfig
.
getConnectionChannelReaderIdleSeconds
(),
serverConfig
.
getConnectionChannelWriterIdleSeconds
(),
serverConfig
.
getServerChannelMaxIdleTimeSeconds
()),
new
NettyConnectManageHandler
(),
new
NettyServerHandler
());
}
});
applyOptions
(
serverBootstrap
);
ChannelFuture
channelFuture
=
this
.
serverBootstrap
.
bind
(
this
.
port
).
syncUninterruptibly
();
...
...
remoting/src/main/java/org/apache/rocketmq/remoting/util/ServiceProvider.java
浏览文件 @
182ca623
...
...
@@ -19,7 +19,6 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
org.apache.rocketmq.logging.InternalLogger
;
import
org.apache.rocketmq.logging.InternalLoggerFactory
;
import
org.apache.rocketmq.remoting.common.RemotingHelper
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录