You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/12/10 07:38:31 UTC
[shardingsphere] branch master updated: Refactor AbstractPluginDefinitionService (#22785)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new e3e21d5c4bd Refactor AbstractPluginDefinitionService (#22785)
e3e21d5c4bd is described below
commit e3e21d5c4bdb958bf41455b89e883afa065b6b37
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sat Dec 10 15:38:25 2022 +0800
Refactor AbstractPluginDefinitionService (#22785)
* Refactor AbstractPluginDefinitionService
---
.../spi/definition/AbstractPluginDefinitionService.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/agent/api/src/main/java/org/apache/shardingsphere/agent/spi/definition/AbstractPluginDefinitionService.java b/agent/api/src/main/java/org/apache/shardingsphere/agent/spi/definition/AbstractPluginDefinitionService.java
index b2359142779..fb6c181d70f 100644
--- a/agent/api/src/main/java/org/apache/shardingsphere/agent/spi/definition/AbstractPluginDefinitionService.java
+++ b/agent/api/src/main/java/org/apache/shardingsphere/agent/spi/definition/AbstractPluginDefinitionService.java
@@ -30,13 +30,13 @@ import java.util.stream.Collectors;
*/
public abstract class AbstractPluginDefinitionService implements PluginDefinitionService {
- private final Map<String, Builder> interceptorPointMap = new HashMap<>();
+ private final Map<String, Builder> interceptorPoints = new HashMap<>();
/**
- * Install to collection of plugin interceptor point.
+ * Install plugin interceptor points.
*
* @param isEnhancedForProxy is enhanced for proxy
- * @return collection of plugin interceptor point
+ * @return plugin interceptor points
*/
public final Collection<PluginInterceptorPoint> install(final boolean isEnhancedForProxy) {
if (isEnhancedForProxy) {
@@ -44,7 +44,7 @@ public abstract class AbstractPluginDefinitionService implements PluginDefinitio
} else {
defineJdbcInterceptors();
}
- return interceptorPointMap.values().stream().map(Builder::install).collect(Collectors.toList());
+ return interceptorPoints.values().stream().map(Builder::install).collect(Collectors.toList());
}
protected abstract void defineProxyInterceptors();
@@ -52,11 +52,11 @@ public abstract class AbstractPluginDefinitionService implements PluginDefinitio
protected abstract void defineJdbcInterceptors();
protected final Builder defineInterceptor(final String targetClassName) {
- if (interceptorPointMap.containsKey(targetClassName)) {
- return interceptorPointMap.get(targetClassName);
+ if (interceptorPoints.containsKey(targetClassName)) {
+ return interceptorPoints.get(targetClassName);
}
Builder result = PluginInterceptorPoint.intercept(targetClassName);
- interceptorPointMap.put(targetClassName, result);
+ interceptorPoints.put(targetClassName, result);
return result;
}
}