Class MysqlDataStore
java.lang.Object
com.ultikits.ultitools.interfaces.impl.data.mysql.MysqlDataStore
- All Implemented Interfaces:
DataStore
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<Class<?>, DataOperator<?>> private com.zaxxer.hikari.HikariDataSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSave all possible caches and destroy all data operation classes.<T extends BaseDataEntity<String>>
DataOperator<T> getOperator(UltiToolsPlugin plugin, Class<T> dataEntity) Get data operation entity class.<T extends BaseDataEntity<String>>
DataOperator<T> getOperator(File dataFolder, Class<T> dataEntity) Get data operator for an external plugin, scoped to the plugin's own data folder.Get the type of data storage.
-
Field Details
-
dataOperatorMap
-
dataSource
private com.zaxxer.hikari.HikariDataSource dataSource
-
-
Constructor Details
-
MysqlDataStore
public MysqlDataStore()
-
-
Method Details
-
getStoreType
Description copied from interface:DataStoreGet the type of data storage.获取此数据存储的类型
- Specified by:
getStoreTypein interfaceDataStore- Returns:
- Data storage type
数据存储类型
-
getOperator
public <T extends BaseDataEntity<String>> DataOperator<T> getOperator(UltiToolsPlugin plugin, Class<T> dataEntity) Description copied from interface:DataStoreGet data operation entity class.获取数据操作实体类
- Specified by:
getOperatorin interfaceDataStore- Type Parameters:
T- Must inheritBaseDataEntity- Parameters:
plugin- Plugin
插件dataEntity- Data entity class
数据实体类- Returns:
- Data operation entity
数据操作实体
-
getOperator
public <T extends BaseDataEntity<String>> DataOperator<T> getOperator(File dataFolder, Class<T> dataEntity) Description copied from interface:DataStoreGet data operator for an external plugin, scoped to the plugin's own data folder.获取外部插件的数据操作器,数据范围限定在插件自己的数据文件夹中。
- Specified by:
getOperatorin interfaceDataStore- Type Parameters:
T- entity type- Parameters:
dataFolder- the external plugin's data folder (e.g., plugins/MyPlugin/)dataEntity- data entity class- Returns:
- data operator
-
destroyAllOperators
public void destroyAllOperators()Description copied from interface:DataStoreSave all possible caches and destroy all data operation classes.保存所有可能的缓存并销毁所有的数据操作类
- Specified by:
destroyAllOperatorsin interfaceDataStore
-