Closed youngzil closed 1 month ago
The changes involve modifications to the AdminServiceAddressLocator
and PortalConfig
classes within the Apollo portal. The AdminServiceAddressLocator
class now includes a new dependency on PortalConfig
, which allows for dynamic configuration of refresh intervals for admin server address tasks. The previous hardcoded constants for refresh intervals have been removed and replaced with method calls to PortalConfig
. The PortalConfig
class has been updated to include new methods for retrieving these intervals, along with validation logic for ensuring the values are within acceptable bounds.
File | Change Summary |
---|---|
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/AdminServiceAddressLocator.java |
- Constructor updated to include PortalConfig . - Removed constants NORMAL_REFRESH_INTERVAL and OFFLINE_REFRESH_INTERVAL . - Replaced with method calls to portalConfig . |
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/config/PortalConfig.java |
- Added methods refreshAdminServerAddressTaskNormalIntervalSecond() and refreshAdminServerAddressTaskOfflineIntervalSecond() . - Introduced validation method checkInt() . - Added constants for default refresh intervals. |
CHANGES.md |
- Updated to reflect Apollo version 2.4.0 release notes, highlighting dynamic configuration for RefreshAdminServerAddressTask . |
Objective | Addressed | Explanation |
---|---|---|
Dynamic adjustment of RefreshAdminServerAddressTask delay time (#5245) |
✅ |
PortalConfig
class by adding methods for dynamic configuration of refresh intervals, which is directly related to the changes made in the AdminServiceAddressLocator
class that now retrieves refresh intervals from PortalConfig
.AdminServiceAddressLocator
and PortalConfig
classes.ConfigService
, enhancing monitoring capabilities, which aligns with the overall theme of improving configuration management and operational visibility in the Apollo system.lgtm
In the land of code where rabbits play,
New settings bloom, brightening the day.
Refresh intervals now dance with grace,
Configurable paths in a dynamic space.
Hopping along, we cheer and sing,
For changes like these make our hearts spring! 🐇✨
@nobodyiam I have solved these problems, please review again
Please help to solve the conflicts in CHANGES.md
Please help to solve the conflicts in CHANGES.md
@nobodyiam I have resolved this conflict, please help review it again
…ime interval
What's the purpose of this PR
XXXXX
Which issue(s) this PR fixes:
Fixes #5245
Brief changelog
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean test
to make sure this pull request doesn't break anything.CHANGES
log.Summary by CodeRabbit
New Features
RefreshAdminServerAddressTask
time interval.restTemplate
client.ConfigService
.Bug Fixes
Refactor