public static void ForEachSnapshotComponent(ISnapshotHandler snapshotHandler) { foreach (var component in ComponentDatabase.IdsToDynamicInvokers.Values) { component.InvokeSnapshotHandler(snapshotHandler); } }
internal static void ForSnapshotComponent(uint componentId, ISnapshotHandler handler) { if (!ComponentDatabase.IdsToDynamicInvokers.TryGetValue(componentId, out var component)) { throw new ArgumentException($"Unknown component ID {componentId}."); } component.InvokeSnapshotHandler(handler); }
public VolatileLogicalTimeManager(ISnapshotHandler handler, TimeSpan snapshotInterval) { this.lastSnapshot = TimeSpan.Zero; this.stopwatch = new Stopwatch(); this.isRunning = false; this.rwLock = new RwLock(); this.handler = handler; this.snapshotInterval = snapshotInterval; this.timer = new Timer(o => this.TimerCallback()); this.stopwatch.Start(); }
public VolatileLogicalTimeManager(ISnapshotHandler handler) : this(handler, TimeSpan.FromSeconds(DefaultLogicalTimeSnapshotIntervalInSeconds)) { }
public void Register(ISnapshotHandler snapshotHandler, string fileName) { _snapshotHandlersByFileName[fileName] = snapshotHandler; }
public AccountDb(IGrainFactory grainFactory, ISnapshotHandler <long, AccountSnapshot> snapshotHandler) { this.grainFactory = grainFactory; this.accountSnapshotHandler = snapshotHandler as AccountSnapshotHandler; }