FlyingZC commented on code in PR #24594:
URL: https://github.com/apache/shardingsphere/pull/24594#discussion_r1136428103
##########
kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/core/rule/GlobalClockRule.java:
##########
@@ -40,12 +46,26 @@ public final class GlobalClockRule implements GlobalRule {
private final boolean enabled;
- public GlobalClockRule(final GlobalClockRuleConfiguration ruleConfig) {
+ public GlobalClockRule(final GlobalClockRuleConfiguration ruleConfig,
final Map<String, ShardingSphereDatabase> databases) {
configuration = ruleConfig;
enabled = ruleConfig.isEnabled();
globalClockProvider = enabled ?
TypedSPILoader.getService(GlobalClockProvider.class, String.join(".",
ruleConfig.getType(), ruleConfig.getProvider()),
null == ruleConfig.getProps() ? new Properties() :
ruleConfig.getProps()) : null;
- Optional.ofNullable(globalClockProvider).ifPresent(optional ->
optional.init(ruleConfig.getProps()));
+ TypedSPILoader.getService(TransactionHook.class, "GlobalClock",
getProps(ruleConfig, databases));
+ }
+
+ private Properties getProps(final GlobalClockRuleConfiguration ruleConfig,
final Map<String, ShardingSphereDatabase> databases) {
+ Properties result = new Properties();
Review Comment:
PropertiesBuilder just in test scope now.
--
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]