public override void Run() { try { using (InputChunk chunk = _data.newChunk()) { while (_data.next(chunk)) { _control.assertHealthy(); int count = 0; while (chunk.Next(_visitor)) { count++; } _roughEntityCountProgress.add(count); } } } catch (IOException e) { _control.panic(e); throw new Exception(e); } catch (Exception e) { _control.panic(e); throw e; } finally { _visitor.Dispose(); } }
public override void Apply(Downstream downstream) { TicketedBatch next = _head; do { downstream.Queue(next); next = next.Next; } while (next != null); _downstreamIdleTime.add(downstream.Send()); }
protected internal override void Process(RECORD[] batch, BatchSender sender) { System.Func <long, IdSequence> idSequence = _prepareIdSequence.apply(Store); int recordsUpdatedInThisBatch = 0; foreach (RECORD record in batch) { if (record != null && record.inUse() && !IdValidator.isReservedId(record.Id)) { Store.prepareForCommit(record, idSequence(record.Id)); Store.updateRecord(record); recordsUpdatedInThisBatch++; } } _recordsUpdated.add(recordsUpdatedInThisBatch); }
public override void Allocated(long bytes) { _allocatedBytes.add(bytes); }
public virtual void Add(long amount) { _progress.add(amount); }