protected override void Restore(NaiadReader reader) { this.nextAvailableEpoch = reader.Read <int>(); this.nextSendEpoch = reader.Read <int>(); int inputQueueCount = reader.Read <int>(); for (int i = 0; i < inputQueueCount; ++i) { S[] array = CheckpointRestoreExtensionMethods.RestoreArray <S>(reader, n => new S[n]); bool isLast = reader.Read <bool>(); this.inputQueue.Enqueue(new Instruction(array, isLast)); } }
public void Restore(NaiadReader reader) { this.indices.Restore(reader); //Console.Error.WriteLine("% LIT.indices read {0} objects", reader.objectsRead - before); //before = reader.objectsRead; this.times = CheckpointRestoreExtensionMethods.RestoreArray <T>(reader, n => { this.count = n; return(this.times.Length >= n ? this.times : new T[n]); }); this.redirection = CheckpointRestoreExtensionMethods.RestoreArray <int>(reader, n => new int[n]); //Console.Error.WriteLine("% LIT.times read {0} objects", reader.objectsRead - before); this.lastInterned = reader.Read <T>(); //Console.Error.WriteLine("% LIT.lastInterned read {0} objects", reader.objectsRead - before); this.lastInternedResult = reader.Read <int>(); //Console.Error.WriteLine("% LIT.lastInternedResult read {0} objects", reader.objectsRead - before); }
public void Restore(NaiadReader reader, NaiadSerialization <Int64> longSerializer, NaiadSerialization <Pointstamp> pointstampSerializer, NaiadSerialization <int> intSerializer) { this.Counts.Restore(reader); this.actualFrontier.Restore(reader); this.Frontier = CheckpointRestoreExtensionMethods.RestoreArray <Pointstamp>(reader, n => new Pointstamp[n]); }