moremind commented on code in PR #5421:
URL: https://github.com/apache/shenyu/pull/5421#discussion_r1467372417
##########
shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/register/ShenyuClientRegisterRepositoryFactory.java:
##########
@@ -29,9 +30,32 @@
* The type shenyu client register repository factory.
*/
public final class ShenyuClientRegisterRepositoryFactory {
-
+
private static final Map<String, ShenyuClientRegisterRepository>
REPOSITORY_MAP = new ConcurrentHashMap<>();
-
+
+ /**
+ * Get the REPOSITORY_MAP.
+ *
+ * @return the REPOSITORY_MAP
+ */
+ //getter
+ public static Map<String, ShenyuClientRegisterRepository>
getRepositoryMap() {
+ return Collections.unmodifiableMap(REPOSITORY_MAP);
+ }
+
+ /**
+ * Sets the repository map with the provided map of
ShenyuClientRegisterRepository instances.
+ * Clears the existing repository map and adds all entries from the
provided map.
+ *
+ * @param repositoryMap The map containing ShenyuClientRegisterRepository
instances,
+ * where each entry's key is the repository type
identifier.
+ */
+ // Setter for testing purposes
Review Comment:
why set?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]