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
32b3ca41
Commit
32b3ca41
authored
Feb 23, 2016
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set registration retries to non-zero by default if peered
parent
aa2d0eb4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
EurekaServerConfigBean.java
...k/cloud/netflix/eureka/server/EurekaServerConfigBean.java
+12
-13
EurekaServerConfiguration.java
...loud/netflix/eureka/server/EurekaServerConfiguration.java
+7
-2
No files found.
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfigBean.java
View file @
32b3ca41
...
@@ -21,16 +21,15 @@ import java.util.HashMap;
...
@@ -21,16 +21,15 @@ import java.util.HashMap;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
import
com.netflix.eureka.aws.AwsBindingStrategy
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.cloud.netflix.eureka.EurekaConstants
;
import
org.springframework.core.env.PropertyResolver
;
import
com.netflix.eureka.EurekaServerConfig
;
import
com.netflix.eureka.EurekaServerConfig
;
import
com.netflix.eureka.aws.AwsBindingStrategy
;
import
org.springframework.cloud.netflix.eureka.EurekaConstants
;
import
lombok.Data
;
import
org.springframework.core.env.PropertyResolver
;
/**
/**
* @author Dave Syer
* @author Dave Syer
...
@@ -90,7 +89,8 @@ public class EurekaServerConfigBean implements EurekaServerConfig, EurekaConstan
...
@@ -90,7 +89,8 @@ public class EurekaServerConfigBean implements EurekaServerConfig, EurekaConstan
private
long
aSGUpdateIntervalMs
=
5
*
MINUTES
;
private
long
aSGUpdateIntervalMs
=
5
*
MINUTES
;
private
long
aSGCacheExpiryTimeoutMs
=
10
*
MINUTES
;
// defaults to longer than the asg update interval
private
long
aSGCacheExpiryTimeoutMs
=
10
*
MINUTES
;
// defaults to longer than the
// asg update interval
private
long
responseCacheAutoExpirationInSeconds
=
180
;
private
long
responseCacheAutoExpirationInSeconds
=
180
;
...
@@ -110,7 +110,6 @@ public class EurekaServerConfigBean implements EurekaServerConfig, EurekaConstan
...
@@ -110,7 +110,6 @@ public class EurekaServerConfigBean implements EurekaServerConfig, EurekaConstan
private
boolean
syncWhenTimestampDiffers
=
true
;
private
boolean
syncWhenTimestampDiffers
=
true
;
//TODO: what should these defaults be? for single first?
private
int
registrySyncRetries
=
0
;
private
int
registrySyncRetries
=
0
;
private
long
registrySyncRetryWaitMs
=
30
*
1000
;
private
long
registrySyncRetryWaitMs
=
30
*
1000
;
...
@@ -221,8 +220,8 @@ public class EurekaServerConfigBean implements EurekaServerConfig, EurekaConstan
...
@@ -221,8 +220,8 @@ public class EurekaServerConfigBean implements EurekaServerConfig, EurekaConstan
@Override
@Override
public
Set
<
String
>
getRemoteRegionAppWhitelist
(
String
regionName
)
{
public
Set
<
String
>
getRemoteRegionAppWhitelist
(
String
regionName
)
{
return
this
.
remoteRegionAppWhitelist
.
get
(
regionName
==
null
?
"global"
return
this
.
remoteRegionAppWhitelist
:
regionName
.
trim
().
toLowerCase
());
.
get
(
regionName
==
null
?
"global"
:
regionName
.
trim
().
toLowerCase
());
}
}
@Override
@Override
...
@@ -242,12 +241,12 @@ public class EurekaServerConfigBean implements EurekaServerConfig, EurekaConstan
...
@@ -242,12 +241,12 @@ public class EurekaServerConfigBean implements EurekaServerConfig, EurekaConstan
@Override
@Override
public
String
getJsonCodecName
()
{
public
String
getJsonCodecName
()
{
return
jsonCodecName
;
return
this
.
jsonCodecName
;
}
}
@Override
@Override
public
String
getXmlCodecName
()
{
public
String
getXmlCodecName
()
{
return
xmlCodecName
;
return
this
.
xmlCodecName
;
}
}
@Override
@Override
...
@@ -262,8 +261,8 @@ public class EurekaServerConfigBean implements EurekaServerConfig, EurekaConstan
...
@@ -262,8 +261,8 @@ public class EurekaServerConfigBean implements EurekaServerConfig, EurekaConstan
@Override
@Override
public
String
getExperimental
(
String
name
)
{
public
String
getExperimental
(
String
name
)
{
if
(
propertyResolver
!=
null
)
{
if
(
this
.
propertyResolver
!=
null
)
{
return
propertyResolver
.
getProperty
(
PREFIX
+
".experimental."
+
name
,
return
this
.
propertyResolver
.
getProperty
(
PREFIX
+
".experimental."
+
name
,
String
.
class
,
null
);
String
.
class
,
null
);
}
}
return
null
;
return
null
;
...
...
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfiguration.java
View file @
32b3ca41
...
@@ -109,8 +109,13 @@ public class EurekaServerConfiguration extends WebMvcConfigurerAdapter {
...
@@ -109,8 +109,13 @@ public class EurekaServerConfiguration extends WebMvcConfigurerAdapter {
protected
static
class
EurekaServerConfigBeanConfiguration
{
protected
static
class
EurekaServerConfigBeanConfiguration
{
@Bean
@Bean
@ConditionalOnMissingBean
@ConditionalOnMissingBean
public
EurekaServerConfig
eurekaServerConfig
()
{
public
EurekaServerConfig
eurekaServerConfig
(
EurekaClientConfig
clientConfig
)
{
return
new
EurekaServerConfigBean
();
EurekaServerConfigBean
server
=
new
EurekaServerConfigBean
();
if
(
clientConfig
.
shouldRegisterWithEureka
())
{
// Set a sensible default if we are supposed to replicate
server
.
setRegistrySyncRetries
(
5
);
}
return
server
;
}
}
}
}
...
...
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