public CacheInvalidationTransactionApplier(NeoStores neoStores, CacheAccessBackDoor cacheAccess) { this._cacheAccess = cacheAccess; this._relationshipTypeTokenStore = neoStores.RelationshipTypeTokenStore; this._labelTokenStore = neoStores.LabelTokenStore; this._propertyKeyTokenStore = neoStores.PropertyKeyTokenStore; }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldTrackSecondaryUnitIdsAsWell() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldTrackSecondaryUnitIdsAsWell() { // GIVEN NeoStores neoStores = NeoStoresRule.builder().build(); HighIdTransactionApplier tracker = new HighIdTransactionApplier(neoStores); NodeRecord node = (new NodeRecord(5)).initialize(true, 123, true, 456, 0); node.SecondaryUnitId = 6; node.RequiresSecondaryUnit = true; RelationshipRecord relationship = (new RelationshipRecord(10)).initialize(true, 1, 2, 3, 4, 5, 6, 7, 8, true, true); relationship.SecondaryUnitId = 12; relationship.RequiresSecondaryUnit = true; RelationshipGroupRecord relationshipGroup = (new RelationshipGroupRecord(8)).initialize(true, 0, 1, 2, 3, 4, 5); relationshipGroup.SecondaryUnitId = 20; relationshipGroup.RequiresSecondaryUnit = true; // WHEN tracker.VisitNodeCommand(new NodeCommand(new NodeRecord(node.Id), node)); tracker.VisitRelationshipCommand(new RelationshipCommand(new RelationshipRecord(relationship.Id), relationship)); tracker.VisitRelationshipGroupCommand(new RelationshipGroupCommand(new RelationshipGroupRecord(relationshipGroup.Id), relationshipGroup)); tracker.Close(); // THEN assertEquals(node.SecondaryUnitId + 1, neoStores.NodeStore.HighId); assertEquals(relationship.SecondaryUnitId + 1, neoStores.RelationshipStore.HighId); assertEquals(relationshipGroup.SecondaryUnitId + 1, neoStores.RelationshipGroupStore.HighId); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Before public void before() public virtual void Before() { FileSystemAbstraction fs = this._fs.get(); StoreFactory storeFactory = new StoreFactory(_testDirectory.databaseLayout(), Config.defaults(), new DefaultIdGeneratorFactory(fs), _pageCacheRule.getPageCache(fs), fs, NullLogProvider.Instance, EmptyVersionContextSupplier.EMPTY); _neoStores = storeFactory.OpenAllNeoStores(true); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void scanForHighIdOnlyOnceWhenProcessCache() internal virtual void ScanForHighIdOnlyOnceWhenProcessCache() { NeoStores neoStores = mock(typeof(NeoStores), Mockito.RETURNS_MOCKS); NodeStore nodeStore = mock(typeof(NodeStore)); NodeRecord nodeRecord = mock(typeof(NodeRecord)); StoreProcessor storeProcessor = mock(typeof(StoreProcessor)); when(neoStores.NodeStore).thenReturn(nodeStore); when(nodeStore.HighId).thenReturn(10L); when(nodeStore.GetRecord(anyLong(), any(typeof(NodeRecord)), any(typeof(RecordLoad)))).thenReturn(nodeRecord); when(nodeStore.NewRecord()).thenReturn(nodeRecord); StoreAccess storeAccess = new StoreAccess(neoStores); storeAccess.Initialize(); DefaultCacheAccess cacheAccess = new DefaultCacheAccess(Counts.NONE, 1); CacheTask.CheckNextRel cacheTask = new CacheTask.CheckNextRel(Org.Neo4j.Consistency.checking.full.Stage_Fields.SequentialForward, cacheAccess, storeAccess, storeProcessor); cacheAccess.CacheSlotSizes = CheckStage.Stage5_Check_NextRel.CacheSlotSizes; cacheTask.ProcessCache(); verify(nodeStore, times(1)).HighId; }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void rebuildReplicatedIdGeneratorsOnRecovery() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void RebuildReplicatedIdGeneratorsOnRecovery() { DefaultFileSystemAbstraction fileSystem = FileSystemRule.get(); File stickyGenerator = new File(TestDirectory.databaseDir(), "stickyGenerator"); File nodeStoreIdGenerator = TestDirectory.databaseLayout().idNodeStore(); StoreFactory storeFactory = new StoreFactory(TestDirectory.databaseLayout(), Config.defaults(), GetIdGenerationFactory(fileSystem), PageCacheRule.getPageCache(fileSystem), fileSystem, NullLogProvider.Instance, EmptyVersionContextSupplier.EMPTY); using (NeoStores neoStores = storeFactory.OpenAllNeoStores(true)) { NodeStore nodeStore = neoStores.NodeStore; for (int i = 0; i < 50; i++) { NodeRecord nodeRecord = nodeStore.NewRecord(); nodeRecord.InUse = true; nodeRecord.Id = nodeStore.NextId(); if (i == 47) { FileUtils.copyFile(nodeStoreIdGenerator, stickyGenerator); } nodeStore.UpdateRecord(nodeRecord); } } FileUtils.copyFile(stickyGenerator, nodeStoreIdGenerator); using (NeoStores reopenedStores = storeFactory.OpenAllNeoStores()) { reopenedStores.MakeStoreOk(); assertEquals(51L, reopenedStores.NodeStore.nextId()); } }
private void FlushNeoStoreOnly() { NeoStores neoStores = (( GraphDatabaseAPI )_db).DependencyResolver.resolveDependency(typeof(RecordStorageEngine)).testAccessNeoStores(); MetaDataStore metaDataStore = neoStores.MetaDataStore; metaDataStore.Flush(); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Before public void startStore() public virtual void StartStore() { _neoStores = (new StoreFactory(Storage.directory().databaseLayout(), Config.defaults(), new DefaultIdGeneratorFactory(Storage.fileSystem()), Storage.pageCache(), Storage.fileSystem(), NullLogProvider.Instance, EmptyVersionContextSupplier.EMPTY)).openNeoStores(true, StoreType.PROPERTY, StoreType.PROPERTY_STRING, StoreType.PROPERTY_ARRAY); _propertyStore = _neoStores.PropertyStore; _records = new DirectRecordAccess <PropertyRecord, PrimitiveRecord>(_propertyStore, Loaders.PropertyLoader(_propertyStore)); _creator = new PropertyCreator(_propertyStore, new PropertyTraverser()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Before public void before() public virtual void Before() { StoreFactory storeFactory = new StoreFactory(_testDirectory.databaseLayout(), Config.defaults(), new DefaultIdGeneratorFactory(_fs.get()), PageCacheRule.getPageCache(_fs.get()), _fs.get(), NullLogProvider.Instance, EmptyVersionContextSupplier.EMPTY); _neoStores = storeFactory.OpenAllNeoStores(true); _store = _neoStores.PropertyStore; _converter = new PropertyPhysicalToLogicalConverter(_store); }
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected: //ORIGINAL LINE: public void dumpDiagnostics(final org.neo4j.kernel.impl.store.NeoStores source, org.neo4j.internal.diagnostics.DiagnosticsPhase phase, org.neo4j.logging.Logger logger) public void DumpDiagnostics(Org.Neo4j.Kernel.impl.store.NeoStores source, [email protected] phase, Org.Neo4j.Logging.Logger logger) { if (Applicable(phase)) { logger.Log(_message); Dump(source, logger); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldUpdateHighIdsOnExternalTransaction() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldUpdateHighIdsOnExternalTransaction() { // GIVEN NeoStores neoStores = NeoStoresRule.builder().build(); HighIdTransactionApplier tracker = new HighIdTransactionApplier(neoStores); // WHEN // Nodes tracker.VisitNodeCommand(Commands.CreateNode(10, 2, 3)); tracker.VisitNodeCommand(Commands.CreateNode(20, 4, 5)); // Relationships tracker.VisitRelationshipCommand(Commands.CreateRelationship(4, 10, 20, 0)); tracker.VisitRelationshipCommand(Commands.CreateRelationship(45, 10, 20, 1)); // Label tokens tracker.VisitLabelTokenCommand(Commands.CreateLabelToken(3, 0)); tracker.VisitLabelTokenCommand(Commands.CreateLabelToken(5, 1)); // Property tokens tracker.VisitPropertyKeyTokenCommand(Commands.CreatePropertyKeyToken(3, 0)); tracker.VisitPropertyKeyTokenCommand(Commands.CreatePropertyKeyToken(5, 1)); // Relationship type tokens tracker.VisitRelationshipTypeTokenCommand(Commands.CreateRelationshipTypeToken(3, 0)); tracker.VisitRelationshipTypeTokenCommand(Commands.CreateRelationshipTypeToken(5, 1)); // Relationship groups tracker.VisitRelationshipGroupCommand(Commands.CreateRelationshipGroup(10, 1)); tracker.VisitRelationshipGroupCommand(Commands.CreateRelationshipGroup(20, 2)); // Schema rules tracker.VisitSchemaRuleCommand(Commands.CreateIndexRule(EMPTY.ProviderDescriptor, 10, SchemaDescriptorFactory.forLabel(0, 1))); tracker.VisitSchemaRuleCommand(Commands.CreateIndexRule(EMPTY.ProviderDescriptor, 20, SchemaDescriptorFactory.forLabel(1, 2))); // Properties tracker.VisitPropertyCommand(Commands.CreateProperty(10, PropertyType.STRING, 0, 6, 7)); tracker.VisitPropertyCommand(Commands.CreateProperty(20, PropertyType.ARRAY, 1, 8, 9)); tracker.Close(); // THEN assertEquals("NodeStore", 20 + 1, neoStores.NodeStore.HighId); assertEquals("DynamicNodeLabelStore", 5 + 1, neoStores.NodeStore.DynamicLabelStore.HighId); assertEquals("RelationshipStore", 45 + 1, neoStores.RelationshipStore.HighId); assertEquals("RelationshipTypeStore", 5 + 1, neoStores.RelationshipTypeTokenStore.HighId); assertEquals("RelationshipType NameStore", 1 + 1, neoStores.RelationshipTypeTokenStore.NameStore.HighId); assertEquals("PropertyKeyStore", 5 + 1, neoStores.PropertyKeyTokenStore.HighId); assertEquals("PropertyKey NameStore", 1 + 1, neoStores.PropertyKeyTokenStore.NameStore.HighId); assertEquals("LabelStore", 5 + 1, neoStores.LabelTokenStore.HighId); assertEquals("Label NameStore", 1 + 1, neoStores.LabelTokenStore.NameStore.HighId); assertEquals("PropertyStore", 20 + 1, neoStores.PropertyStore.HighId); assertEquals("PropertyStore DynamicStringStore", 7 + 1, neoStores.PropertyStore.StringStore.HighId); assertEquals("PropertyStore DynamicArrayStore", 9 + 1, neoStores.PropertyStore.ArrayStore.HighId); assertEquals("SchemaStore", 20 + 1, neoStores.SchemaStore.HighId); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testHonorsPassedInParams() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void TestHonorsPassedInParams() { BatchInserter inserter = BatchInserters.inserter(_testDirectory.databaseDir(), _fileSystemRule.get(), stringMap(GraphDatabaseSettings.pagecache_memory.name(), "280K")); NeoStores neoStores = ReflectionUtil.getPrivateField(inserter, "neoStores", typeof(NeoStores)); PageCache pageCache = ReflectionUtil.getPrivateField(neoStores, "pageCache", typeof(PageCache)); inserter.Shutdown(); long mappedMemoryTotalSize = MuninnPageCache.memoryRequiredForPages(pageCache.MaxCachedPages()); assertThat("memory mapped config is active", mappedMemoryTotalSize, @is(allOf(greaterThan(kibiBytes(270)), lessThan(kibiBytes(290))))); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public boolean isRecoveryRequiredAt(org.neo4j.io.layout.DatabaseLayout databaseLayout) throws java.io.IOException public virtual bool IsRecoveryRequiredAt(DatabaseLayout databaseLayout) { // We need config to determine where the logical log files are if (!NeoStores.isStorePresent(_pageCache, databaseLayout)) { return(false); } LogEntryReader <ReadableClosablePositionAwareChannel> reader = new VersionAwareLogEntryReader <ReadableClosablePositionAwareChannel>(); LogFiles logFiles = LogFilesBuilder.activeFilesBuilder(databaseLayout, _fs, _pageCache).withConfig(_config).withLogEntryReader(reader).build(); LogTailScanner tailScanner = new LogTailScanner(logFiles, reader, _monitors); return((new RecoveryStartInformationProvider(tailScanner, NO_MONITOR)).get().RecoveryRequired); }
internal RecordStorageCommandCreationContext(NeoStores neoStores, int denseNodeThreshold, int idBatchSize) { this._neoStores = neoStores; this._idBatches = new RenewableBatchIdSequences(neoStores, idBatchSize); this._loaders = new Loaders(neoStores); RelationshipGroupGetter relationshipGroupGetter = new RelationshipGroupGetter(_idBatches.idGenerator(StoreType.RELATIONSHIP_GROUP)); this._relationshipCreator = new RelationshipCreator(relationshipGroupGetter, denseNodeThreshold); PropertyTraverser propertyTraverser = new PropertyTraverser(); this._propertyDeleter = new PropertyDeleter(propertyTraverser); this._relationshipDeleter = new RelationshipDeleter(relationshipGroupGetter, _propertyDeleter); this._propertyCreator = new PropertyCreator(new StandardDynamicRecordAllocator(_idBatches.idGenerator(StoreType.PROPERTY_STRING), neoStores.PropertyStore.StringStore.RecordDataSize), new StandardDynamicRecordAllocator(_idBatches.idGenerator(StoreType.PROPERTY_ARRAY), neoStores.PropertyStore.ArrayStore.RecordDataSize), _idBatches.idGenerator(StoreType.PROPERTY), propertyTraverser, neoStores.PropertyStore.allowStorePointsAndTemporal()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void lastTransactionIdIsBaseTxIdWhileNeoStoresAreStopped() public virtual void LastTransactionIdIsBaseTxIdWhileNeoStoresAreStopped() { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.kernel.impl.store.StoreFactory storeFactory = new org.neo4j.kernel.impl.store.StoreFactory(org.neo4j.io.layout.DatabaseLayout.of(new java.io.File("store")), org.neo4j.kernel.configuration.Config.defaults(), new org.neo4j.kernel.impl.store.id.DefaultIdGeneratorFactory(fs.get()), pageCacheRule.getPageCache(fs.get()), fs.get(), org.neo4j.logging.NullLogProvider.getInstance(), org.neo4j.io.pagecache.tracing.cursor.context.EmptyVersionContextSupplier.EMPTY); StoreFactory storeFactory = new StoreFactory(DatabaseLayout.of(new File("store")), Config.defaults(), new DefaultIdGeneratorFactory(Fs.get()), PageCacheRule.getPageCache(Fs.get()), Fs.get(), NullLogProvider.Instance, EmptyVersionContextSupplier.EMPTY); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.kernel.impl.store.NeoStores neoStores = storeFactory.openAllNeoStores(true); NeoStores neoStores = storeFactory.OpenAllNeoStores(true); neoStores.Close(); System.Func <long> supplier = () => neoStores.MetaDataStore.LastCommittedTransactionId; OnDiskLastTxIdGetter diskLastTxIdGetter = new OnDiskLastTxIdGetter(supplier); assertEquals(Org.Neo4j.Kernel.impl.transaction.log.TransactionIdStore_Fields.BASE_TX_ID, diskLastTxIdGetter.LastTxId); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void migrate(org.neo4j.io.layout.DatabaseLayout directoryLayout, org.neo4j.io.layout.DatabaseLayout migrationLayout, org.neo4j.kernel.impl.util.monitoring.ProgressReporter progressReporter, String versionToMigrateFrom, String versionToMigrateTo) throws java.io.IOException public override void Migrate(DatabaseLayout directoryLayout, DatabaseLayout migrationLayout, ProgressReporter progressReporter, string versionToMigrateFrom, string versionToMigrateTo) { if (IsNativeLabelScanStoreMigrationRequired(directoryLayout)) { StoreFactory storeFactory = GetStoreFactory(directoryLayout, versionToMigrateFrom); using (NeoStores neoStores = storeFactory.OpenAllNeoStores(), Lifespan lifespan = new Lifespan()) { neoStores.VerifyStoreOk(); // Remove any existing file to ensure we always do migration DeleteNativeIndexFile(migrationLayout); progressReporter.Start(neoStores.NodeStore.NumberOfIdsInUse); NativeLabelScanStore nativeLabelScanStore = GetNativeLabelScanStore(migrationLayout, progressReporter, neoStores); lifespan.Add(nativeLabelScanStore); } _nativeLabelScanStoreMigrated = true; } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void differentChunksHaveDifferentCursors() public virtual void DifferentChunksHaveDifferentCursors() { GraphDatabaseAPI database = ( GraphDatabaseAPI )(new TestGraphDatabaseFactory()).newEmbeddedDatabase(TestDirectory.storeDir()); try { RecordStorageEngine recordStorageEngine = database.DependencyResolver.resolveDependency(typeof(RecordStorageEngine)); NeoStores neoStores = recordStorageEngine.TestAccessNeoStores(); RecordStorageReader storageReader = new RecordStorageReader(neoStores); TestStoreScanChunk scanChunk1 = new TestStoreScanChunk(this, storageReader, false); TestStoreScanChunk scanChunk2 = new TestStoreScanChunk(this, storageReader, false); assertNotSame(scanChunk1.Cursor, scanChunk2.Cursor); assertNotSame(scanChunk1.StorePropertyCursor, scanChunk2.StorePropertyCursor); } finally { database.Shutdown(); } }
//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: @Test public void shouldDetectAndAbortPropertyChainLoadingOnCircularReference() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldDetectAndAbortPropertyChainLoadingOnCircularReference() { // given NeoStores neoStores = StoresRule.builder().build(); // Create property chain 1 --> 2 --> 3 --> 4 // ↑ │ // └───────────┘ PropertyStore propertyStore = neoStores.PropertyStore; PropertyRecord record = propertyStore.NewRecord(); // 1 record.Id = 1; record.Initialize(true, -1, 2); propertyStore.UpdateRecord(record); // 2 record.Id = 2; record.Initialize(true, 1, 3); propertyStore.UpdateRecord(record); // 3 record.Id = 3; record.Initialize(true, 2, 4); propertyStore.UpdateRecord(record); // 4 record.Id = 4; record.Initialize(true, 3, 2); // <-- completing the circle propertyStore.UpdateRecord(record); // when PropertyReader reader = new PropertyReader(new StoreAccess(neoStores)); try { reader.GetPropertyRecordChain(1); fail("Should have detected circular reference"); } catch (PropertyReader.CircularPropertyRecordChainException e) { // then good assertEquals(4, e.PropertyRecordClosingTheCircle().Id); } }
//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); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public ReadOnlyTransactionIdStore(org.neo4j.io.pagecache.PageCache pageCache, org.neo4j.io.layout.DatabaseLayout databaseLayout) throws java.io.IOException public ReadOnlyTransactionIdStore(PageCache pageCache, DatabaseLayout databaseLayout) { long id = 0; long checksum = 0; long logVersion = 0; long byteOffset = 0; if (NeoStores.isStorePresent(pageCache, databaseLayout)) { File neoStore = databaseLayout.MetadataStore(); id = getRecord(pageCache, neoStore, Position.LAST_TRANSACTION_ID); checksum = getRecord(pageCache, neoStore, Position.LAST_TRANSACTION_CHECKSUM); logVersion = getRecord(pageCache, neoStore, Position.LAST_CLOSED_TRANSACTION_LOG_VERSION); byteOffset = getRecord(pageCache, neoStore, Position.LAST_CLOSED_TRANSACTION_LOG_BYTE_OFFSET); } this._transactionId = id; this._transactionChecksum = checksum; this._logVersion = logVersion; this._byteOffset = byteOffset; }
private NativeLabelScanStore GetNativeLabelScanStore(DatabaseLayout migrationDirectoryStructure, ProgressReporter progressReporter, NeoStores neoStores) { NeoStoreIndexStoreView neoStoreIndexStoreView = new NeoStoreIndexStoreView(NO_LOCK_SERVICE, neoStores); return(new NativeLabelScanStore(_pageCache, migrationDirectoryStructure, _fileSystem, new MonitoredFullLabelStream(neoStoreIndexStoreView, progressReporter), false, new Monitors(), RecoveryCleanupWorkCollector.immediate())); }
public CacheInvalidationBatchTransactionApplier(NeoStores neoStores, CacheAccessBackDoor cacheAccess) { this._neoStores = neoStores; this._cacheAccess = cacheAccess; }
public DataInitializerAnonymousInnerClass(NeoStores outerInstance, Org.Neo4j.Kernel.impl.store.NeoStores neoStores) { this.outerInstance = outerInstance; this._neoStores = neoStores; log = outerInstance.logProvider.GetLog(typeof(MetaDataStore)); }
internal abstract void dump(Org.Neo4j.Kernel.impl.store.NeoStores source, Org.Neo4j.Logging.Logger logger);
public HighIdBatchTransactionApplier(NeoStores neoStores) { this._neoStores = neoStores; }