1
mirror of https://github.com/CarmJos/MineSQL.git synced 2026-06-04 16:43:03 +08:00

refactor(api): 支持独立创建注册池,便于插件内部管理链接

This commit is contained in:
2022-12-19 18:07:34 +08:00
parent 38afb05fc8
commit 2321ed35c2
13 changed files with 70 additions and 77 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>minesql-parent</artifactId>
<groupId>cc.carm.plugin</groupId>
<version>1.0.0</version>
<version>1.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -27,6 +27,8 @@ interface IMineSQL {
@NotNull SQLRegistry getRegistry();
@NotNull SQLRegistry createRegistry();
/**
* 创建一个新的 SQLManager 实例
*
@@ -43,6 +43,15 @@ public class MineSQL {
return instance.getRegistry();
}
/**
* 创建一个独立的管理器注册池。
*
* @return {@link SQLRegistry}
*/
public static @NotNull SQLRegistry createRegistry() {
return instance.createRegistry();
}
/**
* 创建一个新的 SQLManager 实例
*
@@ -12,8 +12,7 @@ import java.util.Optional;
* 入口类
*/
public interface SQLRegistry {
/**
* 获取原生注册的指定名称的 SQLManager 实例
*