private static InputIterator legacyRelationshipsAsInput( NeoStores legacyStore, boolean requiresPropertyMigration ) { return new StoreScanAsInputIterator<RelationshipRecord>( legacyStore.getRelationshipStore() ) { @Override public InputChunk newChunk() { return new RelationshipRecordChunk( new RecordStorageReader( legacyStore ), requiresPropertyMigration ); } }; }
public RelationshipStore getRelationshipStore() { return neoStores.getRelationshipStore(); }
@Override public boolean visitRelationshipCommand( RelationshipCommand command ) { track( neoStores.getRelationshipStore(), command ); return false; }
@Override protected RelationshipStore getStore( NeoStores neoStores ) { return neoStores.getRelationshipStore(); } }
private RecordRelationshipScanCursor createRelationshipCursor() { return new RecordRelationshipScanCursor( neoStores.getRelationshipStore() ); } }
public NeoStoreIndexStoreView( LockService locks, NeoStores neoStores ) { this.locks = locks; this.neoStores = neoStores; this.propertyStore = neoStores.getPropertyStore(); this.nodeStore = neoStores.getNodeStore(); this.relationshipStore = neoStores.getRelationshipStore(); this.counts = neoStores.getCounts(); }
private static ExecutionMonitor migrationBatchImporterMonitor( NeoStores legacyStore, final ProgressReporter progressReporter, Configuration config ) { return new BatchImporterProgressMonitor( legacyStore.getNodeStore().getHighId(), legacyStore.getRelationshipStore().getHighId(), config, progressReporter ); }
@Override public boolean visitRelationshipCommand( Command.RelationshipCommand command ) { lockGroup.add( lockService.acquireRelationshipLock( command.getKey(), LockService.LockType.WRITE_LOCK ) ); updateStore( neoStores.getRelationshipStore(), command ); return false; }
private RecordRelationshipTraversalCursor getNodeRelationshipCursor() { return new RecordRelationshipTraversalCursor( neoStores.getRelationshipStore(), neoStores.getRelationshipGroupStore() ); } }
private RelationshipRecord getRelRecord( long id ) { return getRecord( resolveNeoStores().getRelationshipStore(), id ); }
private void update( RelationshipRecord record ) { resolveNeoStores().getRelationshipStore().updateRecord( record ); }
public Loaders( NeoStores neoStores ) { this( neoStores.getNodeStore(), neoStores.getPropertyStore(), neoStores.getRelationshipStore(), neoStores.getRelationshipGroupStore(), neoStores.getPropertyKeyTokenStore(), neoStores.getRelationshipTypeTokenStore(), neoStores.getLabelTokenStore(), neoStores.getSchemaStore() ); }
private BatchTransactionApplier newIndexApplier() { return new IndexBatchTransactionApplier( indexingService, labelScanStoreSynchronizer, indexUpdatesSync, nodeStore, neoStores.getRelationshipStore(), new PropertyPhysicalToLogicalConverter( propertyStore ), indexActivator ); }
public DirectRecordAccessSet( NeoStores neoStores ) { this( neoStores.getNodeStore(), neoStores.getPropertyStore(), neoStores.getRelationshipStore(), neoStores.getRelationshipGroupStore(), neoStores.getPropertyKeyTokenStore(), neoStores.getRelationshipTypeTokenStore(), neoStores.getLabelTokenStore(), neoStores.getSchemaStore() ); }
private void unUseRecord( long recordId ) { RelationshipStore relationshipStore = neoStores.getRelationshipStore(); RelationshipRecord relationshipRecord = relationshipStore.getRecord( recordId, new RelationshipRecord( -1 ), RecordLoad.FORCE ); relationshipRecord.setInUse( false ); relationshipStore.updateRecord( relationshipRecord ); }
CountsComputer( NeoStores stores, PageCache pageCache, DatabaseLayout databaseLayout ) { this( stores.getMetaDataStore().getLastCommittedTransactionId(), stores.getNodeStore(), stores.getRelationshipStore(), (int) stores.getLabelTokenStore().getHighId(), (int) stores.getRelationshipTypeTokenStore().getHighId(), NumberArrayFactory.auto( pageCache, databaseLayout.databaseDirectory(), true, NumberArrayFactory.NO_MONITOR ) ); }
void updateCorrespondingIdGenerators( NeoStores neoStores ) { neoStores.getNodeStore().setHighestPossibleIdInUse( nodeId ); neoStores.getRelationshipStore().setHighestPossibleIdInUse( relId ); neoStores.getRelationshipGroupStore().setHighestPossibleIdInUse( relGroupId ); } }
@Test public void retrieveUnusedRelationship() { RelationshipStore relationshipStore = neoStores.getRelationshipStore(); relationshipStore.setHighId( 10 ); createRelationshipRecord( RELATIONSHIP_ID, 1, relationshipStore, false ); try ( RecordRelationshipScanCursor cursor = createRelationshipCursor() ) { cursor.single( RELATIONSHIP_ID ); assertFalse( cursor.next() ); } }
@Test public void retrieveUsedRelationship() { RelationshipStore relationshipStore = neoStores.getRelationshipStore(); createRelationshipRecord( RELATIONSHIP_ID, 1, relationshipStore, true ); try ( RecordRelationshipScanCursor cursor = createRelationshipCursor() ) { cursor.single( RELATIONSHIP_ID ); assertTrue( cursor.next() ); assertEquals( RELATIONSHIP_ID, cursor.entityReference() ); } }
private Iterable<EntityUpdates> indexUpdatesOf( NeoStores neoStores, TransactionRepresentation transaction ) throws IOException { PropertyCommandsExtractor extractor = new PropertyCommandsExtractor(); transaction.accept( extractor ); CollectingIndexingUpdateService indexingUpdateService = new CollectingIndexingUpdateService(); OnlineIndexUpdates onlineIndexUpdates = new OnlineIndexUpdates( neoStores.getNodeStore(), neoStores.getRelationshipStore(), indexingUpdateService, new PropertyPhysicalToLogicalConverter( neoStores.getPropertyStore() ) ); onlineIndexUpdates.feed( extractor.propertyCommandsByNodeIds(), extractor.propertyCommandsByRelationshipIds(), extractor.nodeCommandsById(), extractor.relationshipCommandsById() ); return indexingUpdateService.entityUpdatesList; }