$callLoad static method
Future<void>
$callLoad(
- Node node,
- NodeStorage storage,
- PrecisionStopwatch wallClock, {
- bool hotload = false,
Implementation
static Future<void> $callLoad(
Node node, NodeStorage storage, PrecisionStopwatch wallClock,
{bool hotload = false}) async {
if (node is Stateful) {
if (hotload) {
PLogger.modifiers.add(_hlk);
}
Stateful s = node as Stateful;
s._storage = storage;
PrecisionStopwatch p = PrecisionStopwatch.start();
await s.onLoad(await storage.read(s), hotloaded: hotload);
node.logger.verbose(
"Loaded State in ${p.getMilliseconds().toStringAsFixed(0)}ms");
if (hotload) {
PLogger.modifiers.remove(_hlk);
}
}
}