Utility class for managing signal persistence.
Features:
Used by ClientStrategy for live mode persistence.
constructor();
PersistSignalFactory: any
getSignalStorage: any
readSignalData: (symbol: string, strategyName: string, exchangeName: string) => Promise<ISignalRow>
Reads persisted signal data for a symbol and strategy.
Called by ClientStrategy.waitForInit() to restore state. Returns null if no signal exists.
writeSignalData: (signalRow: ISignalRow, symbol: string, strategyName: string, exchangeName: string) => Promise<void>
Writes signal data to disk with atomic file writes.
Called by ClientStrategy.setPendingSignal() to persist state. Uses atomic writes to prevent corruption on crashes.
usePersistSignalAdapter(Ctor: TPersistBaseCtor<StrategyName, SignalData>): void;
Registers a custom persistence adapter.
useJson(): void;
Switches to the default JSON persist adapter. All future persistence writes will use JSON storage.
useDummy(): void;
Switches to a dummy persist adapter that discards all writes. All future persistence writes will be no-ops.