可选storage: StorageProvider受保护_受保护init受保护log受保护dirty受保护saveCheck if the manager has been initialized.
Wait for the manager to be ready. Automatically calls initialize() if not already initialized.
受保护scheduleSchedule a save operation to be executed after a delay. Multiple calls will be debounced - only one save will occur.
The async function to call for saving
受保护setSet the delay for automatic save operations.
Delay in milliseconds
受保护doSubclasses must implement this method to perform actual initialization. This method is called exactly once, when initialize() is first called.
Initialize the manager. This method is idempotent. If already initialized, returns immediately. If initialization is in progress, waits for it to complete.
智能分片策略:基于增强历史数据使用 ShardOptimizer 进行方差感知负载均衡 传入完整的 DurationEstimate 信息(含置信度和方差),优化器据此做风险分散
增强版历史更新:同时维护方差、EMA、百分位数、极值 使用 Welford 在线算法计算方差,EMA 进行时间衰减
记录分片预测反馈并自动校准 对比每个分片的预测总耗时与实际总耗时,使用学习率调整校准因子
Immediately flush any pending save operations. Clears any scheduled save and executes it immediately.
Extended base manager with automatic save scheduling functionality. Useful for managers that need to persist data periodically.
示例