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 RelationshipCountsStage(Configuration config, NodeLabelsCache cache, RelationshipStore relationshipStore, int highLabelId, int highRelationshipTypeId, Org.Neo4j.Kernel.Impl.Api.CountsAccessor_Updater countsUpdater, NumberArrayFactory cacheFactory, ProgressReporter progressReporter) : base(NAME, null, config, RECYCLE_BATCHES) { Add(new BatchFeedStep(Control(), config, allIn(relationshipStore, config), relationshipStore.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, relationshipStore)); Add(new ReadRecordsStep <object>(Control(), config, false, relationshipStore)); Add(new ProcessRelationshipCountsDataStep(Control(), cache, config, highLabelId, highRelationshipTypeId, countsUpdater, cacheFactory, progressReporter)); }
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()))); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void relationshipScanCursorShouldClosePageCursor() internal virtual void RelationshipScanCursorShouldClosePageCursor() { RelationshipStore store = mock(typeof(RelationshipStore)); PageCursor pageCursor = mock(typeof(PageCursor)); when(store.OpenPageCursorForReading(anyLong())).thenReturn(pageCursor); using (RecordRelationshipScanCursor cursor = new RecordRelationshipScanCursor(store)) { cursor.Single(0); } verify(pageCursor).close(); }
protected internal RelationshipImporter(BatchingNeoStores stores, IdMapper idMapper, DataStatistics typeDistribution, Monitor monitor, Collector badCollector, bool validateRelationshipData, bool doubleRecordUnits) : base(stores, monitor) { this._doubleRecordUnits = doubleRecordUnits; this._relationshipTypeTokenRepository = stores.RelationshipTypeRepository; this._idMapper = idMapper; this._badCollector = badCollector; this._validateRelationshipData = validateRelationshipData; this._relationshipStore = stores.RelationshipStore; this._relationshipRecord = _relationshipStore.newRecord(); this._relationshipIds = new BatchingIdGetter(_relationshipStore); this._typeCounts = typeDistribution.NewClient(); this._prepareIdSequence = PrepareIdSequence.of(doubleRecordUnits).apply(stores.RelationshipStore); _relationshipRecord.InUse = true; }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void relationshipGroupCursorShouldClosePageCursor() internal virtual void RelationshipGroupCursorShouldClosePageCursor() { RelationshipStore relationshipStore = mock(typeof(RelationshipStore)); PageCursor relationshipPageCursor = mock(typeof(PageCursor)); when(relationshipStore.OpenPageCursorForReading(anyLong())).thenReturn(relationshipPageCursor); RelationshipGroupStore store = mock(typeof(RelationshipGroupStore)); PageCursor pageCursor = mock(typeof(PageCursor)); when(store.OpenPageCursorForReading(anyLong())).thenReturn(pageCursor); using (RecordRelationshipGroupCursor cursor = new RecordRelationshipGroupCursor(relationshipStore, store)) { cursor.Init(0, 0); } verify(pageCursor).close(); verifyZeroInteractions(relationshipStore, relationshipPageCursor); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldClearStateOnClose() public virtual void ShouldClearStateOnClose() { // GIVEN NeoStores mockStore = mock(typeof(NeoStores)); NodeStore store = mock(typeof(NodeStore)); when(mockStore.NodeStore).thenReturn(store); RelationshipStore relationshipStore = mock(typeof(RelationshipStore)); when(mockStore.RelationshipStore).thenReturn(relationshipStore); PropertyStore propertyStore = mock(typeof(PropertyStore)); when(mockStore.PropertyStore).thenReturn(propertyStore); SchemaStore schemaStore = mock(typeof(SchemaStore)); when(mockStore.SchemaStore).thenReturn(schemaStore); RelationshipGroupStore groupStore = mock(typeof(RelationshipGroupStore)); when(mockStore.RelationshipGroupStore).thenReturn(groupStore); RecordChangeSet changeSet = new RecordChangeSet(new Loaders(mockStore)); // WHEN /* * We need to make sure some stuff is stored in the sets being managed. That is why forChangingLinkage() is * called - otherwise, no changes will be stored and changeSize() would return 0 anyway. */ changeSet.NodeRecords.create(1L, null).forChangingLinkage(); changeSet.PropertyRecords.create(1L, null).forChangingLinkage(); changeSet.RelRecords.create(1L, null).forChangingLinkage(); changeSet.SchemaRuleChanges.create(1L, null).forChangingLinkage(); changeSet.RelGroupRecords.create(1L, 1).forChangingLinkage(); changeSet.Close(); // THEN assertEquals(0, changeSet.NodeRecords.changeSize()); assertEquals(0, changeSet.PropertyRecords.changeSize()); assertEquals(0, changeSet.RelRecords.changeSize()); assertEquals(0, changeSet.SchemaRuleChanges.changeSize()); assertEquals(0, changeSet.RelGroupRecords.changeSize()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings({"unchecked", "rawtypes"}) public static org.neo4j.kernel.impl.store.NeoStores basicMockedNeoStores() public static NeoStores BasicMockedNeoStores() { NeoStores neoStores = mock(typeof(NeoStores)); // NodeStore - DynamicLabelStore NodeStore nodeStore = mock(typeof(NodeStore)); when(neoStores.NodeStore).thenReturn(nodeStore); // NodeStore - DynamicLabelStore DynamicArrayStore dynamicLabelStore = mock(typeof(DynamicArrayStore)); when(nodeStore.DynamicLabelStore).thenReturn(dynamicLabelStore); // RelationshipStore RelationshipStore relationshipStore = mock(typeof(RelationshipStore)); when(neoStores.RelationshipStore).thenReturn(relationshipStore); // RelationshipGroupStore RelationshipGroupStore relationshipGroupStore = mock(typeof(RelationshipGroupStore)); when(neoStores.RelationshipGroupStore).thenReturn(relationshipGroupStore); // PropertyStore PropertyStore propertyStore = mock(typeof(PropertyStore)); when(neoStores.PropertyStore).thenReturn(propertyStore); // PropertyStore -- DynamicStringStore DynamicStringStore propertyStringStore = mock(typeof(DynamicStringStore)); when(propertyStore.StringStore).thenReturn(propertyStringStore); // PropertyStore -- DynamicArrayStore DynamicArrayStore propertyArrayStore = mock(typeof(DynamicArrayStore)); when(propertyStore.ArrayStore).thenReturn(propertyArrayStore); return(neoStores); }
internal RecordRelationshipScanCursor(RelationshipStore relationshipStore) : base(relationshipStore) { }
private void RelationshipAdvance(RelationshipRecord record, PageCursor pageCursor) { // When scanning, we inspect RelationshipRecord.inUse(), so using RecordLoad.CHECK is fine RelationshipStore.nextRecordByCursor(record, RecordLoad.CHECK, pageCursor); }