Interface DataStore

All Known Implementing Classes:
JsonStore, MysqlDataStore, SQLiteDataStore

public interface DataStore
Data storage interface.

数据存储接口

  • Method Details

    • getStoreType

      String getStoreType()
      Get the type of data storage.

      获取此数据存储的类型

      Returns:
      Data storage type
      数据存储类型
    • getOperator

      <T extends BaseDataEntity<String>> DataOperator<T> getOperator(UltiToolsPlugin plugin, Class<T> dataEntity)
      Get data operation entity class.

      获取数据操作实体类

      Type Parameters:
      T - Must inherit BaseDataEntity
      Parameters:
      plugin - Plugin
      插件
      dataEntity - Data entity class
      数据实体类
      Returns:
      Data operation entity
      数据操作实体
    • getOperator

      default <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.

      获取外部插件的数据操作器,数据范围限定在插件自己的数据文件夹中。

      Type Parameters:
      T - entity type
      Parameters:
      dataFolder - the external plugin's data folder (e.g., plugins/MyPlugin/)
      dataEntity - data entity class
      Returns:
      data operator
      Since:
      6.2.2
    • destroyAllOperators

      void destroyAllOperators()
      Save all possible caches and destroy all data operation classes.

      保存所有可能的缓存并销毁所有的数据操作类