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);
        }
Beispiel #3
0
 protected internal override void Process(RelationshipGroupRecord[] batch, BatchSender sender)
 {
     foreach (RelationshipGroupRecord record in batch)
     {
         if (record.InUse())
         {
             _cache.incrementGroupCount(record.OwningNode);
         }
     }
 }
//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);
        }
Beispiel #5
0
 protected internal override void Process(RelationshipGroupRecord[] batch, BatchSender sender)
 {
     // These records are read page-wise forwards, but should be cached in reverse
     // since the records exists in the store in reverse order.
     for (int i = batch.Length - 1; i >= 0; i--)
     {
         RelationshipGroupRecord record = batch[i];
         if (record.InUse())
         {
             _cache.put(record);
         }
     }
 }
Beispiel #6
0
        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);
            }
        }