protected internal override void LastCallForEmittingOutstandingBatches(BatchSender sender) { if (_cursor > 0) { sender.Send(_current); } }
protected internal override void Process(RelationshipGroupRecord[] batch, BatchSender sender) { foreach (RelationshipGroupRecord group in batch) { if (!group.InUse()) { continue; } long nodeId = group.OwningNode; if (_cache.getByte(nodeId, 0) == 0) { _cache.setByte(nodeId, 0, ( sbyte )1); NodeRecord nodeRecord = _nodeStore.newRecord(); _nodeStore.getRecordByCursor(nodeId, nodeRecord, NORMAL, _nodeCursor); nodeRecord.NextRel = group.Id; nodeRecord.Dense = true; _current[_cursor++] = nodeRecord; if (_cursor == _batchSize) { sender.Send(_current); NewBatch(); } } } control.recycle(batch); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: protected void process(org.neo4j.kernel.impl.store.record.NodeRecord[] batch, org.neo4j.unsafe.impl.batchimport.staging.BatchSender sender) throws Throwable protected internal override void Process(NodeRecord[] batch, BatchSender sender) { foreach (NodeRecord node in batch) { if (node.InUse()) { _writer.write(labelChanges(node.Id, EMPTY_LONG_ARRAY, get(node, _nodeStore))); } } sender.Send(batch); }
protected internal override void Process(T[] batch, BatchSender sender) { foreach (T item in batch) { if (item != null && item.inUse()) { if (!_processor.process(item)) { // No change for this record item.InUse = false; } } } // This step can be used in different stage settings, possible as the last step, // where nothing should be emitted if (!_endOfLine) { sender.Send(batch); } }