Renames and refactoring for reloadable plugins #30992
Merged
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.
This handles some renames and javadocs for the reload-secure-store-action feature branch to deck it before merging to master. This is required because the scope of the branch was somewhat fluid, and as the work progressed, the names and comments were not illustrative for their purposes. This has mostly ornamental value but it does contains two refactorings, hence the encompassing PR title.
Here is the list with all renames:
All services that lend clients (
AwsS3Service
,AwsEc2Service
,GoogleCloudStorageService
andAzureStorageService
) have the methodsclient
andrefreshAndClearCache
. Thisclient
method creates (and cache) and returns a client (or a releasable wrapper). TherefreshAndClearCache
method updates the settings from which new clients are built and clears the cache of the old clients.Besides renames, there is one notable refactoring:
ReloadablePlugin#reload
now returns an exception on failure instead of a blandfalse
return value. This cascades back to the node response and how it deals with error handling.The other refactoring is that the method
releaseCachedClient
(forAwsS3Service
andAwsEc2Service
is now hidden and exposed throughCloseable#close
).Relates #29135