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
870b9839
Commit
870b9839
authored
Aug 10, 2017
by
liYao
Committed by
GitHub
Aug 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
原代码中使用了含有打点Cat的方法名。建议使用Monitor等抽象语义代替。
实际方法名由Apollo官方决定。
parent
1ca1b8d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
NotificationControllerV2.java
...lo/configservice/controller/NotificationControllerV2.java
+4
-4
No files found.
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/NotificationControllerV2.java
View file @
870b9839
...
@@ -159,17 +159,17 @@ public class NotificationControllerV2 implements ReleaseMessageListener {
...
@@ -159,17 +159,17 @@ public class NotificationControllerV2 implements ReleaseMessageListener {
}
}
deferredResult
deferredResult
.
onTimeout
(()
->
logWatchedKeysTo
Cat
(
watchedKeys
,
"Apollo.LongPoll.TimeOutKeys"
));
.
onTimeout
(()
->
logWatchedKeysTo
Monitor
(
watchedKeys
,
"Apollo.LongPoll.TimeOutKeys"
));
deferredResult
.
onCompletion
(()
->
{
deferredResult
.
onCompletion
(()
->
{
//unregister all keys
//unregister all keys
for
(
String
key
:
watchedKeys
)
{
for
(
String
key
:
watchedKeys
)
{
deferredResults
.
remove
(
key
,
deferredResult
);
deferredResults
.
remove
(
key
,
deferredResult
);
}
}
logWatchedKeysTo
Cat
(
watchedKeys
,
"Apollo.LongPoll.CompletedKeys"
);
logWatchedKeysTo
Monitor
(
watchedKeys
,
"Apollo.LongPoll.CompletedKeys"
);
});
});
logWatchedKeysTo
Cat
(
watchedKeys
,
"Apollo.LongPoll.RegisteredKeys"
);
logWatchedKeysTo
Monitor
(
watchedKeys
,
"Apollo.LongPoll.RegisteredKeys"
);
logger
.
debug
(
"Listening {} from appId: {}, cluster: {}, namespace: {}, datacenter: {}"
,
logger
.
debug
(
"Listening {} from appId: {}, cluster: {}, namespace: {}, datacenter: {}"
,
watchedKeys
,
appId
,
cluster
,
namespaces
,
dataCenter
);
watchedKeys
,
appId
,
cluster
,
namespaces
,
dataCenter
);
}
}
...
@@ -278,7 +278,7 @@ public class NotificationControllerV2 implements ReleaseMessageListener {
...
@@ -278,7 +278,7 @@ public class NotificationControllerV2 implements ReleaseMessageListener {
return
keys
.
get
(
2
);
return
keys
.
get
(
2
);
};
};
private
void
logWatchedKeysTo
Cat
(
Set
<
String
>
watchedKeys
,
String
eventName
)
{
private
void
logWatchedKeysTo
Monitor
(
Set
<
String
>
watchedKeys
,
String
eventName
)
{
for
(
String
watchedKey
:
watchedKeys
)
{
for
(
String
watchedKey
:
watchedKeys
)
{
Tracer
.
logEvent
(
eventName
,
watchedKey
);
Tracer
.
logEvent
(
eventName
,
watchedKey
);
}
}
...
...
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