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
e4a0094f
Commit
e4a0094f
authored
Aug 12, 2017
by
nobodyiam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename method names
parent
cfe3ad66
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
ConfigServiceLocator.java
...trip/framework/apollo/internals/ConfigServiceLocator.java
+5
-5
NotificationController.java
...ollo/configservice/controller/NotificationController.java
+4
-4
No files found.
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/ConfigServiceLocator.java
View file @
e4a0094f
...
...
@@ -106,11 +106,11 @@ public class ConfigServiceLocator {
transaction
.
setStatus
(
Transaction
.
SUCCESS
);
List
<
ServiceDTO
>
services
=
response
.
getBody
();
if
(
services
==
null
||
services
.
isEmpty
())
{
logConfigService
ToCat
(
"Empty response!"
);
logConfigService
(
"Empty response!"
);
continue
;
}
m_configServices
.
set
(
services
);
logConfigServices
ToCat
(
services
);
logConfigServices
(
services
);
return
;
}
catch
(
Throwable
ex
)
{
Tracer
.
logEvent
(
"ApolloConfigException"
,
ExceptionUtil
.
getDetailMessage
(
ex
));
...
...
@@ -145,13 +145,13 @@ public class ConfigServiceLocator {
return
domainName
+
"/services/config?"
+
MAP_JOINER
.
join
(
queryParams
);
}
private
void
logConfigServices
ToCat
(
List
<
ServiceDTO
>
serviceDtos
)
{
private
void
logConfigServices
(
List
<
ServiceDTO
>
serviceDtos
)
{
for
(
ServiceDTO
serviceDto
:
serviceDtos
)
{
logConfigService
ToCat
(
serviceDto
.
getHomepageUrl
());
logConfigService
(
serviceDto
.
getHomepageUrl
());
}
}
private
void
logConfigService
ToCat
(
String
serviceUrl
)
{
private
void
logConfigService
(
String
serviceUrl
)
{
Tracer
.
logEvent
(
"Apollo.Config.Services"
,
serviceUrl
);
}
}
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/NotificationController.java
View file @
e4a0094f
...
...
@@ -107,17 +107,17 @@ public class NotificationController implements ReleaseMessageListener {
}
deferredResult
.
onTimeout
(()
->
logWatchedKeys
ToCat
(
watchedKeys
,
"Apollo.LongPoll.TimeOutKeys"
));
.
onTimeout
(()
->
logWatchedKeys
(
watchedKeys
,
"Apollo.LongPoll.TimeOutKeys"
));
deferredResult
.
onCompletion
(()
->
{
//unregister all keys
for
(
String
key
:
watchedKeys
)
{
deferredResults
.
remove
(
key
,
deferredResult
);
}
logWatchedKeys
ToCat
(
watchedKeys
,
"Apollo.LongPoll.CompletedKeys"
);
logWatchedKeys
(
watchedKeys
,
"Apollo.LongPoll.CompletedKeys"
);
});
logWatchedKeys
ToCat
(
watchedKeys
,
"Apollo.LongPoll.RegisteredKeys"
);
logWatchedKeys
(
watchedKeys
,
"Apollo.LongPoll.RegisteredKeys"
);
logger
.
debug
(
"Listening {} from appId: {}, cluster: {}, namespace: {}, datacenter: {}"
,
watchedKeys
,
appId
,
cluster
,
namespace
,
dataCenter
);
}
...
...
@@ -159,7 +159,7 @@ public class NotificationController implements ReleaseMessageListener {
logger
.
debug
(
"Notification completed"
);
}
private
void
logWatchedKeys
ToCat
(
Set
<
String
>
watchedKeys
,
String
eventName
)
{
private
void
logWatchedKeys
(
Set
<
String
>
watchedKeys
,
String
eventName
)
{
for
(
String
watchedKey
:
watchedKeys
)
{
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