Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
openSource
apollo
Commits
994e003d
Commit
994e003d
authored
Nov 03, 2017
by
Yunlong Liang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add callback to defferdResult before putting to the map.
parent
49ecba4c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
NotificationControllerV2.java
...lo/configservice/controller/NotificationControllerV2.java
+5
-5
No files found.
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/NotificationControllerV2.java
View file @
994e003d
...
...
@@ -150,11 +150,6 @@ public class NotificationControllerV2 implements ReleaseMessageListener {
if
(!
CollectionUtils
.
isEmpty
(
newNotifications
))
{
deferredResultWrapper
.
setResult
(
newNotifications
);
}
else
{
//register all keys
for
(
String
key
:
watchedKeys
)
{
this
.
deferredResults
.
put
(
key
,
deferredResultWrapper
);
}
deferredResultWrapper
.
onTimeout
(()
->
logWatchedKeys
(
watchedKeys
,
"Apollo.LongPoll.TimeOutKeys"
));
...
...
@@ -166,6 +161,11 @@ public class NotificationControllerV2 implements ReleaseMessageListener {
logWatchedKeys
(
watchedKeys
,
"Apollo.LongPoll.CompletedKeys"
);
});
//register all keys
for
(
String
key
:
watchedKeys
)
{
this
.
deferredResults
.
put
(
key
,
deferredResultWrapper
);
}
logWatchedKeys
(
watchedKeys
,
"Apollo.LongPoll.RegisteredKeys"
);
logger
.
debug
(
"Listening {} from appId: {}, cluster: {}, namespace: {}, datacenter: {}"
,
watchedKeys
,
appId
,
cluster
,
namespaces
,
dataCenter
);
...
...
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