feature #I9PVQ7 决策路由中增加namespace,可以执行指定命名空间的决策路由

This commit is contained in:
everywhere.z 2024-05-29 21:19:58 +08:00
parent 3e3ab505d9
commit ce2a9c854e
1 changed files with 4 additions and 4 deletions

View File

@ -23,16 +23,16 @@ public class SqlReadFactory {
private static final Map<ReadType, SqlReadPollTask<?>> POLL_TASK_MAP = new HashMap<>();
public static void registerRead(SQLParserVO config) {
READ_MAP.putIfAbsent(ReadType.CHAIN, new ChainRead(config));
READ_MAP.putIfAbsent(ReadType.SCRIPT, new ScriptRead(config));
READ_MAP.put(ReadType.CHAIN, new ChainRead(config));
READ_MAP.put(ReadType.SCRIPT, new ScriptRead(config));
}
public static void registerSqlReadPollTask(ReadType readType) {
SqlRead<?> sqlRead = getSqlRead(readType);
if (ReadType.CHAIN.equals(readType)) {
POLL_TASK_MAP.putIfAbsent(ReadType.CHAIN, new ChainReadPollTask((ChainRead)sqlRead));
POLL_TASK_MAP.put(ReadType.CHAIN, new ChainReadPollTask((ChainRead)sqlRead));
} else if (ReadType.SCRIPT.equals(readType)) {
POLL_TASK_MAP.putIfAbsent(ReadType.SCRIPT, new ScriptReadPollTask((ScriptRead)sqlRead));
POLL_TASK_MAP.put(ReadType.SCRIPT, new ScriptReadPollTask((ScriptRead)sqlRead));
}
}