接口 ProgressManager

所有已知实现类:
MemoryProgressManager

public interface ProgressManager
进度管理器接口,用于导入导出操作的进度管理。 The ProgressManager interface is designed for managing the progress of import and export operations.
作者:
Toutatis_Gc
  • 方法概要

    修饰符和类型
    方法
    说明
    getProgress(String progressId)
    获取进度。
    void
    init(String progressId, int totalRecords)
    初始化进度管理器,设置进度ID和总记录数。
    boolean
    isFinished(String progressId)
    检查进度是否已完成。
    void
    updateProgress(String progressId, int currentRecords)
    更新进度,设置当前已处理的记录数。
  • 方法详细资料

    • init

      void init(String progressId, int totalRecords)
      初始化进度管理器,设置进度ID和总记录数。 Initializes the progress manager with the specified progress ID and total number of records.
      参数:
      progressId - 进度ID,用于唯一标识一个进度任务。 The progress ID used to uniquely identify a progress task.
      totalRecords - 总记录数,表示整个操作涉及的记录总数。 The total number of records, indicating the overall number of records involved in the operation.
    • updateProgress

      void updateProgress(String progressId, int currentRecords)
      更新进度,设置当前已处理的记录数。 Updates the progress by specifying the current number of processed records.
      参数:
      progressId - 进度ID,用于标识要更新的进度任务。 The progress ID identifying the progress task to be updated.
      currentRecords - 当前已处理的记录数,表示已经完成的记录数量。 The current number of processed records, indicating the completed number of records.
    • getProgress

      Double getProgress(String progressId)
      获取进度。
      参数:
      progressId - 进度ID,用于标识要更新的进度任务。 The progress ID identifying the progress task to be updated.
      返回:
      当前进度。 The current progress.
    • isFinished

      boolean isFinished(String progressId)
      检查进度是否已完成。 Checks if the progress has been completed.
      参数:
      progressId - 进度ID,用于标识要检查的进度任务。 The progress ID identifying the progress task to be checked.
      返回:
      true 如果进度已完成,否则为 false。 true if the progress has been completed, false otherwise.