可选storage: StorageProvider受保护_受保护init受保护log受保护dirty受保护saveInitialize the manager. This method is idempotent. If already initialized, returns immediately. If initialization is in progress, waits for it to complete.
Check 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.
可选testId: stringImmediately 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.
示例