Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor KubernetesClient [HZG-225] (hazelcast#3455)
Refactors KubernetesClient and related classes as a preparation for https://hazelcast.atlassian.net/browse/HZG-225. KubernetesClient 1. Improve Javadoc (mainly line wrapping). 2. Decrease the number of constructors from 3 to 2: one taking KubernetesConfig and used in production, and one taking all variables and used in tests. 3. Simplify `buildKubernetesApiUrlProvider()`. 4. Make `extractStsName()` static. 5. Move `extractSts(JsonObject)` to `RuntimeContext#from(JsonObject, String)`. 6. Replace simple `String#format` usages with string concatenation. 7. Remove `StsMonitorThread#latestResourceVersion` since it is already accessible through `latestRuntimeContext.getResourceVersion()`. 8. Refactor `StsMonitorThread#onMessage(String)` and rename it to `onWatchEventReceived`. 9. Refactor and inline `parseStsList(JsonObject)`. RuntimeContext 1. Remove UNKNOWN since it is already defined in ClusterTopologyIntentTracker. StsMonitorTest 1. Refactor `buildSts(...)`. GitOrigin-RevId: 0efb501bd95947faf96678403f92f437e3f2321a
- Loading branch information