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
f0c0f6ad
Unverified
Commit
f0c0f6ad
authored
Nov 11, 2017
by
Jason Song
Committed by
GitHub
Nov 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #814 from xiaoerlyl/master
Add callback to defferdResult before putting to the map
parents
7c4456de
37dea6d4
Hide 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 @
f0c0f6ad
...
...
@@ -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