-
Notifications
You must be signed in to change notification settings - Fork 719
Add retry support for blocking LoadBalancer #832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1d44150
Add LoadBalancerProperties and BlockingLoadBalancedRetryPolicy. Add s…
OlgaMaciaszek 08d6fd8
Add BlockingLoadBalancedRetryFactory
OlgaMaciaszek 2e07d26
Move retry properties to LoadBalancerRetryProperties.
OlgaMaciaszek 8cb08d5
Refactor and remove deprecations, fix checkstyle.
OlgaMaciaszek c84fa6a
Add BlockingLoadBalancedRetryPolicy to autoconfiguration. Set default…
OlgaMaciaszek f0d4bcc
Allow using @Order on LoadBalancedRetryFactory beans.
OlgaMaciaszek f8e0ab2
Add tests. Reformat tests. Add explanatory comments.
OlgaMaciaszek cde8b47
Add documentation.
OlgaMaciaszek ed8b59f
Fix javadoc.
OlgaMaciaszek e5e1f84
Fix docs after review.
OlgaMaciaszek e14e2e4
Change field name.
OlgaMaciaszek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add BlockingLoadBalancedRetryFactory
- Loading branch information
commit 08d6fd86df76d09bb3a2559aacb76293ca37d288
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...g/springframework/cloud/loadbalancer/blocking/retry/BlockingLoadBalancedRetryFactory.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package org.springframework.cloud.loadbalancer.blocking.retry; | ||
|
|
||
| import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory; | ||
| import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicy; | ||
| import org.springframework.cloud.client.loadbalancer.ServiceInstanceChooser; | ||
| import org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerProperties; | ||
|
|
||
| /** | ||
| * @author Olga Maciaszek-Sharma | ||
| */ | ||
| public class BlockingLoadBalancedRetryFactory implements LoadBalancedRetryFactory { | ||
|
|
||
| private final LoadBalancerProperties.Retry retryProperties; | ||
|
|
||
| public BlockingLoadBalancedRetryFactory(LoadBalancerProperties properties) { | ||
| retryProperties = properties.getRetry(); | ||
| } | ||
|
|
||
| @Override | ||
| public LoadBalancedRetryPolicy createRetryPolicy(String serviceId, ServiceInstanceChooser serviceInstanceChooser) { | ||
| return new BlockingLoadBalancedRetryPolicy(serviceId, serviceInstanceChooser, retryProperties); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.