//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldNotProcessLoopsTwice() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldNotProcessLoopsTwice() { // GIVEN NodeRelationshipCache cache = mock(typeof(NodeRelationshipCache)); using (CalculateDenseNodesStep step = new CalculateDenseNodesStep(mock(typeof(StageControl)), DEFAULT, cache)) { step.Processors(4); step.Start(0); // WHEN long id = 0; RelationshipRecord[] batch = batch(Relationship(id++, 1, 5), Relationship(id++, 3, 10), Relationship(id++, 2, 2), Relationship(id++, 4, 1)); step.Receive(0, batch); step.endOfUpstream(); step.awaitCompleted(); // THEN verify(cache, times(2)).incrementCount(eq(1L)); verify(cache, times(1)).incrementCount(eq(2L)); verify(cache, times(1)).incrementCount(eq(3L)); verify(cache, times(1)).incrementCount(eq(4L)); verify(cache, times(1)).incrementCount(eq(5L)); verify(cache, times(1)).incrementCount(eq(10L)); } }
public NodeDegreeCountStage(Configuration config, RelationshipStore store, NodeRelationshipCache cache, StatsProvider memoryUsageStatsProvider) : base(NAME, null, config, RECYCLE_BATCHES) { Add(new BatchFeedStep(Control(), config, forwards(0, store.HighId, config), store.RecordSize)); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: add(new org.neo4j.unsafe.impl.batchimport.staging.ReadRecordsStep<>(control(), config, false, store)); Add(new ReadRecordsStep <object>(Control(), config, false, store)); Add(new CalculateDenseNodesStep(Control(), config, cache, memoryUsageStatsProvider)); }
public RelationshipLinkStep(StageControl control, Configuration config, NodeRelationshipCache cache, System.Predicate <RelationshipRecord> filter, int nodeTypes, bool forwards, params StatsProvider[] additionalStatsProvider) : base(control, "LINK", config, additionalStatsProvider) { this.Cache = cache; this._filter = filter; this._nodeTypes = nodeTypes; this._forwards = forwards; this._progress = FindLinkingProgressStatsProvider(); }
public CalculateDenseNodesStep(StageControl control, Configuration config, NodeRelationshipCache cache, params StatsProvider[] statsProviders) : base(control, "CALCULATE", config, statsProviders) { this._cache = cache; }
public ReadNodeIdsByCacheStep(StageControl control, Configuration config, NodeRelationshipCache cache, int nodeTypes) : base(control, config) { this._cache = cache; this._nodeTypes = nodeTypes; }
public SparseNodeFirstRelationshipStage(Configuration config, NodeStore nodeStore, NodeRelationshipCache cache) : base(NAME, null, config, ORDER_SEND_DOWNSTREAM | RECYCLE_BATCHES) { Add(new ReadNodeIdsByCacheStep(Control(), config, cache, NodeType.NODE_TYPE_SPARSE)); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: add(new org.neo4j.unsafe.impl.batchimport.staging.ReadRecordsStep<>(control(), config, true, nodeStore)); Add(new ReadRecordsStep <object>(Control(), config, true, nodeStore)); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: add(new RecordProcessorStep<>(control(), "LINK", config, new SparseNodeFirstRelationshipProcessor(cache), false)); Add(new RecordProcessorStep <object>(Control(), "LINK", config, new SparseNodeFirstRelationshipProcessor(cache), false)); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: add(new UpdateRecordsStep<>(control(), config, nodeStore, new org.neo4j.unsafe.impl.batchimport.store.StorePrepareIdSequence())); Add(new UpdateRecordsStep <object>(Control(), config, nodeStore, new StorePrepareIdSequence())); }
public RelationshipLinkforwardStage(string topic, Configuration config, BatchingNeoStores stores, NodeRelationshipCache cache, System.Predicate <RelationshipRecord> readFilter, System.Predicate <RelationshipRecord> denseChangeFilter, int nodeTypes, params StatsProvider[] additionalStatsProvider) : base(NAME, topic, config, ORDER_SEND_DOWNSTREAM | RECYCLE_BATCHES) { RelationshipStore store = stores.RelationshipStore; Add(new BatchFeedStep(Control(), config, forwards(0, store.HighId, config), store.RecordSize)); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: add(new org.neo4j.unsafe.impl.batchimport.staging.ReadRecordsStep<>(control(), config, true, store, new org.neo4j.unsafe.impl.batchimport.staging.RecordDataAssembler<>(store::newRecord, readFilter))); Add(new ReadRecordsStep <object>(Control(), config, true, store, new RecordDataAssembler <object>(store.newRecord, readFilter))); Add(new RelationshipLinkforwardStep(Control(), config, cache, denseChangeFilter, nodeTypes, additionalStatsProvider)); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: add(new UpdateRecordsStep<>(control(), config, store, org.neo4j.unsafe.impl.batchimport.store.PrepareIdSequence.of(stores.usesDoubleRelationshipRecordUnits()))); Add(new UpdateRecordsStep <object>(Control(), config, store, PrepareIdSequence.of(stores.UsesDoubleRelationshipRecordUnits()))); }
public SparseNodeFirstRelationshipProcessor(NodeRelationshipCache cache) { this._cache = cache; }
public RelationshipLinkforwardStep(StageControl control, Configuration config, NodeRelationshipCache cache, System.Predicate <RelationshipRecord> filter, int nodeTypes, params StatsProvider[] additionalStatsProvider) : base(control, config, cache, filter, nodeTypes, true, additionalStatsProvider) { }
public RelationshipGroupStage( string topic, Configuration config, RecordStore<RelationshipGroupRecord> store, NodeRelationshipCache cache ) : base( NAME, topic, config, RECYCLE_BATCHES ) { Add( new ReadGroupRecordsByCacheStep( Control(), config, store, cache ) ); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: add(new UpdateRecordsStep<>(control(), config, store, new org.neo4j.unsafe.impl.batchimport.store.StorePrepareIdSequence())); Add( new UpdateRecordsStep<object>( Control(), config, store, new StorePrepareIdSequence() ) ); }
public ReadGroupRecordsByCacheStep(StageControl control, Configuration config, RecordStore <RelationshipGroupRecord> store, NodeRelationshipCache cache) : base(control, config) { this._store = store; this._cache = cache; }