Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
signal
traffic-signal-platform
Commits
2942e5a1
Commit
2942e5a1
authored
May 25, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 代码优化
parent
0998ed96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
Application.java
...c-dt-service/src/main/java/net/wanji/com/Application.java
+1
-1
NettyClient.java
...ervice/src/main/java/net/wanji/com/netty/NettyClient.java
+2
-2
UtcFeignClientCache.java
...rc/main/java/net/wanji/utc/cache/UtcFeignClientCache.java
+1
-1
No files found.
signal-utc-dt-service/src/main/java/net/wanji/com/Application.java
View file @
2942e5a1
...
...
@@ -30,6 +30,6 @@ public class Application implements CommandLineRunner {
@Override
public
void
run
(
String
...
args
)
throws
Exception
{
NettyClient
.
start
(
localPort
,
remoteProt
);
NettyClient
.
connection
(
localPort
,
remoteProt
);
}
}
signal-utc-dt-service/src/main/java/net/wanji/com/netty/NettyClient.java
View file @
2942e5a1
...
...
@@ -36,7 +36,7 @@ public class NettyClient {
/**
* 建立连接
*/
public
static
void
start
(
int
localPort
,
int
remotePort
)
throws
InterruptedException
{
public
static
void
connection
(
int
localPort
,
int
remotePort
)
throws
InterruptedException
{
EventLoopGroup
group
=
new
NioEventLoopGroup
();
Bootstrap
bootstrap
=
new
Bootstrap
();
bootstrap
.
group
(
group
)
...
...
@@ -101,7 +101,7 @@ public class NettyClient {
NettyMessageCache
.
NETTY_MESSAGE_RESULT_MAP
.
forEach
((
k
,
v
)
->
{
threadPoolExecutor
.
execute
(()
->
{
if
(
now
-
v
.
getStartTime
()
>
v
.
getWaitMillisecond
())
{
log
.
warn
(
"wait {}ms
{}
timeout"
,
v
.
getWaitMillisecond
(),
k
);
log
.
warn
(
"wait {}ms
[{}]
timeout"
,
v
.
getWaitMillisecond
(),
k
);
v
.
getCountDownLatch
().
countDown
();
}
});
...
...
signal-utc-service/src/main/java/net/wanji/utc/cache/UtcFeignClientCache.java
View file @
2942e5a1
...
...
@@ -16,7 +16,7 @@ import java.util.Map;
@Component
public
class
UtcFeignClientCache
implements
CommandLineRunner
{
public
static
final
Map
<
String
,
UtcFeignCommon
>
utcFeignClientsMap
=
new
HashMap
();
public
static
final
Map
<
String
,
UtcFeignCommon
>
utcFeignClientsMap
=
new
HashMap
<>
();
public
UtcFeignCommon
getUtcFeignClientService
(
String
name
)
{
if
(!
utcFeignClientsMap
.
isEmpty
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment