Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
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
spring-cloud-netflix
Commits
914fee9a
Commit
914fee9a
authored
Oct 12, 2015
by
alexVengrovsk
Committed by
Spencer Gibb
Oct 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add isDebugEnabled() check
It is good thing to make this checks because of expensive concatenation of String objects (debug messages).
parent
a3a7c609
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
LeaseManagerMessageBroker.java
...etflix/eureka/server/event/LeaseManagerMessageBroker.java
+12
-6
No files found.
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/event/LeaseManagerMessageBroker.java
View file @
914fee9a
...
...
@@ -45,8 +45,10 @@ public class LeaseManagerMessageBroker implements LeaseManagerLite<InstanceInfo>
@Override
public
void
register
(
InstanceInfo
info
,
int
leaseDuration
,
boolean
isReplication
)
{
log
.
debug
(
"register "
+
info
.
getAppName
()
+
", vip "
+
info
.
getVIPAddress
()
+
", leaseDuration "
+
leaseDuration
+
", isReplication "
+
isReplication
);
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"register "
+
info
.
getAppName
()
+
", vip "
+
info
.
getVIPAddress
()
+
", leaseDuration "
+
leaseDuration
+
", isReplication "
+
isReplication
);
}
// TODO: what to publish from info (whole object?)
this
.
ctxt
.
publishEvent
(
new
EurekaInstanceRegisteredEvent
(
this
,
info
,
leaseDuration
,
isReplication
));
...
...
@@ -54,8 +56,10 @@ public class LeaseManagerMessageBroker implements LeaseManagerLite<InstanceInfo>
@Override
public
boolean
cancel
(
String
appName
,
String
serverId
,
boolean
isReplication
)
{
log
.
debug
(
"cancel "
+
appName
+
" serverId "
+
serverId
+
", isReplication {}"
+
isReplication
);
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"cancel "
+
appName
+
" serverId "
+
serverId
+
", isReplication {}"
+
isReplication
);
}
this
.
ctxt
.
publishEvent
(
new
EurekaInstanceCanceledEvent
(
this
,
appName
,
serverId
,
isReplication
));
return
false
;
...
...
@@ -64,8 +68,10 @@ public class LeaseManagerMessageBroker implements LeaseManagerLite<InstanceInfo>
@Override
public
boolean
renew
(
final
String
appName
,
final
String
serverId
,
boolean
isReplication
)
{
log
.
debug
(
"renew "
+
appName
+
" serverId "
+
serverId
+
", isReplication {}"
+
isReplication
);
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"renew "
+
appName
+
" serverId "
+
serverId
+
", isReplication {}"
+
isReplication
);
}
List
<
Application
>
applications
=
PeerAwareInstanceRegistryImpl
.
getInstance
()
.
getSortedApplications
();
for
(
Application
input
:
applications
)
{
...
...
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