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
aa2159b7
Commit
aa2159b7
authored
Jul 25, 2017
by
Gregor Zurowski
Committed by
Spencer Gibb
Jul 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Lombok from spring-cloud-netflix-eureka-client module (#2131)
parent
1c30c246
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
166 additions
and
17 deletions
+166
-17
pom.xml
spring-cloud-netflix-eureka-client/pom.xml
+0
-7
CloudEurekaTransportConfig.java
...work/cloud/netflix/eureka/CloudEurekaTransportConfig.java
+151
-2
EurekaClientConfigBean.java
...ramework/cloud/netflix/eureka/EurekaClientConfigBean.java
+0
-0
EurekaDiscoveryClient.java
...framework/cloud/netflix/eureka/EurekaDiscoveryClient.java
+5
-3
EurekaInstanceConfigBean.java
...mework/cloud/netflix/eureka/EurekaInstanceConfigBean.java
+0
-0
DomainExtractingServerList.java
...oud/netflix/ribbon/eureka/DomainExtractingServerList.java
+10
-5
No files found.
spring-cloud-netflix-eureka-client/pom.xml
View file @
aa2159b7
...
...
@@ -112,13 +112,6 @@
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<!-- Only needed at compile time -->
<scope>
compile
</scope>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
<scope>
test
</scope>
...
...
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/CloudEurekaTransportConfig.java
View file @
aa2159b7
...
...
@@ -18,12 +18,12 @@ package org.springframework.cloud.netflix.eureka;
import
com.netflix.discovery.shared.transport.EurekaTransportConfig
;
import
lombok.Data
;
import
java.util.Objects
;
/**
* @author Spencer Gibb
* @author Gregor Zurowski
*/
@Data
public
class
CloudEurekaTransportConfig
implements
EurekaTransportConfig
{
private
int
sessionedClientReconnectIntervalSeconds
=
20
*
60
;
...
...
@@ -59,4 +59,153 @@ public class CloudEurekaTransportConfig implements EurekaTransportConfig {
public
boolean
applicationsResolverUseIp
()
{
return
this
.
applicationsResolverUseIp
;
}
public
int
getSessionedClientReconnectIntervalSeconds
()
{
return
sessionedClientReconnectIntervalSeconds
;
}
public
void
setSessionedClientReconnectIntervalSeconds
(
int
sessionedClientReconnectIntervalSeconds
)
{
this
.
sessionedClientReconnectIntervalSeconds
=
sessionedClientReconnectIntervalSeconds
;
}
public
double
getRetryableClientQuarantineRefreshPercentage
()
{
return
retryableClientQuarantineRefreshPercentage
;
}
public
void
setRetryableClientQuarantineRefreshPercentage
(
double
retryableClientQuarantineRefreshPercentage
)
{
this
.
retryableClientQuarantineRefreshPercentage
=
retryableClientQuarantineRefreshPercentage
;
}
public
int
getBootstrapResolverRefreshIntervalSeconds
()
{
return
bootstrapResolverRefreshIntervalSeconds
;
}
public
void
setBootstrapResolverRefreshIntervalSeconds
(
int
bootstrapResolverRefreshIntervalSeconds
)
{
this
.
bootstrapResolverRefreshIntervalSeconds
=
bootstrapResolverRefreshIntervalSeconds
;
}
public
int
getApplicationsResolverDataStalenessThresholdSeconds
()
{
return
applicationsResolverDataStalenessThresholdSeconds
;
}
public
void
setApplicationsResolverDataStalenessThresholdSeconds
(
int
applicationsResolverDataStalenessThresholdSeconds
)
{
this
.
applicationsResolverDataStalenessThresholdSeconds
=
applicationsResolverDataStalenessThresholdSeconds
;
}
public
int
getAsyncResolverRefreshIntervalMs
()
{
return
asyncResolverRefreshIntervalMs
;
}
public
void
setAsyncResolverRefreshIntervalMs
(
int
asyncResolverRefreshIntervalMs
)
{
this
.
asyncResolverRefreshIntervalMs
=
asyncResolverRefreshIntervalMs
;
}
public
int
getAsyncResolverWarmUpTimeoutMs
()
{
return
asyncResolverWarmUpTimeoutMs
;
}
public
void
setAsyncResolverWarmUpTimeoutMs
(
int
asyncResolverWarmUpTimeoutMs
)
{
this
.
asyncResolverWarmUpTimeoutMs
=
asyncResolverWarmUpTimeoutMs
;
}
public
int
getAsyncExecutorThreadPoolSize
()
{
return
asyncExecutorThreadPoolSize
;
}
public
void
setAsyncExecutorThreadPoolSize
(
int
asyncExecutorThreadPoolSize
)
{
this
.
asyncExecutorThreadPoolSize
=
asyncExecutorThreadPoolSize
;
}
public
String
getReadClusterVip
()
{
return
readClusterVip
;
}
public
void
setReadClusterVip
(
String
readClusterVip
)
{
this
.
readClusterVip
=
readClusterVip
;
}
public
String
getWriteClusterVip
()
{
return
writeClusterVip
;
}
public
void
setWriteClusterVip
(
String
writeClusterVip
)
{
this
.
writeClusterVip
=
writeClusterVip
;
}
public
boolean
isBootstrapResolverForQuery
()
{
return
bootstrapResolverForQuery
;
}
public
void
setBootstrapResolverForQuery
(
boolean
bootstrapResolverForQuery
)
{
this
.
bootstrapResolverForQuery
=
bootstrapResolverForQuery
;
}
public
String
getBootstrapResolverStrategy
()
{
return
bootstrapResolverStrategy
;
}
public
void
setBootstrapResolverStrategy
(
String
bootstrapResolverStrategy
)
{
this
.
bootstrapResolverStrategy
=
bootstrapResolverStrategy
;
}
public
boolean
isApplicationsResolverUseIp
()
{
return
applicationsResolverUseIp
;
}
public
void
setApplicationsResolverUseIp
(
boolean
applicationsResolverUseIp
)
{
this
.
applicationsResolverUseIp
=
applicationsResolverUseIp
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
CloudEurekaTransportConfig
that
=
(
CloudEurekaTransportConfig
)
o
;
return
sessionedClientReconnectIntervalSeconds
==
that
.
sessionedClientReconnectIntervalSeconds
&&
Double
.
compare
(
retryableClientQuarantineRefreshPercentage
,
that
.
retryableClientQuarantineRefreshPercentage
)
==
0
&&
bootstrapResolverRefreshIntervalSeconds
==
that
.
bootstrapResolverRefreshIntervalSeconds
&&
applicationsResolverDataStalenessThresholdSeconds
==
that
.
applicationsResolverDataStalenessThresholdSeconds
&&
asyncResolverRefreshIntervalMs
==
that
.
asyncResolverRefreshIntervalMs
&&
asyncResolverWarmUpTimeoutMs
==
that
.
asyncResolverWarmUpTimeoutMs
&&
asyncExecutorThreadPoolSize
==
that
.
asyncExecutorThreadPoolSize
&&
Objects
.
equals
(
readClusterVip
,
that
.
readClusterVip
)
&&
Objects
.
equals
(
writeClusterVip
,
that
.
writeClusterVip
)
&&
bootstrapResolverForQuery
==
that
.
bootstrapResolverForQuery
&&
Objects
.
equals
(
bootstrapResolverStrategy
,
that
.
bootstrapResolverStrategy
)
&&
applicationsResolverUseIp
==
that
.
applicationsResolverUseIp
;
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
sessionedClientReconnectIntervalSeconds
,
retryableClientQuarantineRefreshPercentage
,
bootstrapResolverRefreshIntervalSeconds
,
applicationsResolverDataStalenessThresholdSeconds
,
asyncResolverRefreshIntervalMs
,
asyncResolverWarmUpTimeoutMs
,
asyncExecutorThreadPoolSize
,
readClusterVip
,
writeClusterVip
,
bootstrapResolverForQuery
,
bootstrapResolverStrategy
,
applicationsResolverUseIp
);
}
@Override
public
String
toString
()
{
return
new
StringBuilder
(
"CloudEurekaTransportConfig{"
)
.
append
(
"sessionedClientReconnectIntervalSeconds="
).
append
(
sessionedClientReconnectIntervalSeconds
).
append
(
", "
)
.
append
(
"retryableClientQuarantineRefreshPercentage="
).
append
(
retryableClientQuarantineRefreshPercentage
).
append
(
", "
)
.
append
(
"bootstrapResolverRefreshIntervalSeconds="
).
append
(
bootstrapResolverRefreshIntervalSeconds
).
append
(
", "
)
.
append
(
"applicationsResolverDataStalenessThresholdSeconds="
).
append
(
applicationsResolverDataStalenessThresholdSeconds
).
append
(
", "
)
.
append
(
"asyncResolverRefreshIntervalMs="
).
append
(
asyncResolverRefreshIntervalMs
).
append
(
", "
)
.
append
(
"asyncResolverWarmUpTimeoutMs="
).
append
(
asyncResolverWarmUpTimeoutMs
).
append
(
", "
)
.
append
(
"asyncExecutorThreadPoolSize="
).
append
(
asyncExecutorThreadPoolSize
).
append
(
", "
)
.
append
(
"readClusterVip='"
).
append
(
readClusterVip
).
append
(
"', "
)
.
append
(
"writeClusterVip='"
).
append
(
writeClusterVip
).
append
(
"', "
)
.
append
(
"bootstrapResolverForQuery="
).
append
(
bootstrapResolverForQuery
).
append
(
", "
)
.
append
(
"bootstrapResolverStrategy='"
).
append
(
bootstrapResolverStrategy
).
append
(
"', "
)
.
append
(
"applicationsResolverUseIp="
).
append
(
applicationsResolverUseIp
).
append
(
", "
).
append
(
"}"
)
.
toString
();
}
}
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java
View file @
aa2159b7
This diff is collapsed.
Click to expand it.
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaDiscoveryClient.java
View file @
aa2159b7
...
...
@@ -35,12 +35,9 @@ import com.netflix.discovery.EurekaClient;
import
com.netflix.discovery.shared.Application
;
import
com.netflix.discovery.shared.Applications
;
import
lombok.RequiredArgsConstructor
;
/**
* @author Spencer Gibb
*/
@RequiredArgsConstructor
public
class
EurekaDiscoveryClient
implements
DiscoveryClient
{
public
static
final
String
DESCRIPTION
=
"Spring Cloud Eureka Discovery Client"
;
...
...
@@ -49,6 +46,11 @@ public class EurekaDiscoveryClient implements DiscoveryClient {
private
final
EurekaClient
eurekaClient
;
public
EurekaDiscoveryClient
(
EurekaInstanceConfig
config
,
EurekaClient
eurekaClient
)
{
this
.
config
=
config
;
this
.
eurekaClient
=
eurekaClient
;
}
@Override
public
String
description
()
{
return
DESCRIPTION
;
...
...
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaInstanceConfigBean.java
View file @
aa2159b7
This diff is collapsed.
Click to expand it.
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/ribbon/eureka/DomainExtractingServerList.java
View file @
aa2159b7
...
...
@@ -19,9 +19,6 @@ package org.springframework.cloud.netflix.ribbon.eureka;
import
java.util.ArrayList
;
import
java.util.List
;
import
lombok.Getter
;
import
lombok.Setter
;
import
com.netflix.appinfo.InstanceInfo
;
import
com.netflix.client.config.CommonClientConfigKey
;
import
com.netflix.client.config.IClientConfig
;
...
...
@@ -78,10 +75,18 @@ public class DomainExtractingServerList implements ServerList<DiscoveryEnabledSe
class
DomainExtractingServer
extends
DiscoveryEnabledServer
{
@Getter
@Setter
private
String
id
;
@Override
public
String
getId
()
{
return
id
;
}
@Override
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
DomainExtractingServer
(
DiscoveryEnabledServer
server
,
boolean
useSecurePort
,
boolean
useIpAddr
,
boolean
approximateZoneFromHostname
)
{
// host and port are set in super()
...
...
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