NodeInputIdPropertyLookup( PropertyStore propertyStore ) { this.propertyStore = propertyStore; this.propertyRecord = propertyStore.newRecord(); }
@Override public PropertyRecord load( long key, PrimitiveRecord additionalData ) { PropertyRecord record = store.getRecord( key, store.newRecord(), NORMAL ); setOwner( record, additionalData ); return record; }
public NodeImporter( BatchingNeoStores stores, IdMapper idMapper, Monitor monitor ) { super( stores, monitor ); this.labelTokenRepository = stores.getLabelRepository(); this.idMapper = idMapper; this.nodeStore = stores.getNodeStore(); this.nodeRecord = nodeStore.newRecord(); this.nodeIds = new BatchingIdGetter( nodeStore ); this.idPropertyStore = stores.getTemporaryPropertyStore(); this.idPropertyRecord = idPropertyStore.newRecord(); nodeRecord.setInUse( true ); }
private boolean visitPropertyRecordChain( long firstPropertyRecordId, Visitor<PropertyRecord,RuntimeException> visitor ) throws CircularPropertyRecordChainException { if ( Record.NO_NEXT_PROPERTY.is( firstPropertyRecordId ) ) { return false; } MutableLongSet visitedPropertyRecordIds = new LongHashSet( 8 ); visitedPropertyRecordIds.add( firstPropertyRecordId ); long nextProp = firstPropertyRecordId; while ( !Record.NO_NEXT_PROPERTY.is( nextProp ) ) { PropertyRecord propRecord = propertyStore.getRecord( nextProp, propertyStore.newRecord(), FORCE ); nextProp = propRecord.getNextProp(); if ( !Record.NO_NEXT_PROPERTY.is( nextProp ) && !visitedPropertyRecordIds.add( nextProp ) ) { throw new CircularPropertyRecordChainException( propRecord ); } if ( visitor.visit( propRecord ) ) { return true; } } return false; }
private List<Pair<String, Object>> getPropertiesFromRecord( long recordId ) { final PropertyRecord record = propertyStore().getRecord( recordId, propertyStore().newRecord(), RecordLoad.FORCE ); final List<Pair<String, Object>> props = new ArrayList<>(); record.forEach( block -> { final Object value = propertyStore().getValue( block ).asObject(); final String name = propertyStore().getPropertyKeyTokenStore().getToken( block.getKeyIndexId() ).name(); props.add( pair( name, value ) ); } ); return props; }
PropertyRecord recordBeforeWrite = store.getRecord( propertyRecordId, store.newRecord(), FORCE ); assertFalse( recordBeforeWrite.inUse() ); return null;
private static long calculateNumberOfProperties( NeoStores stores ) { long count = 0; PropertyRecord record = stores.getPropertyStore().newRecord(); try ( PageCursor cursor = stores.getPropertyStore().openPageCursorForReading( 0 ) ) { long highId = stores.getPropertyStore().getHighId(); for ( long id = 0; id < highId; id++ ) { stores.getPropertyStore().getRecordByCursor( id, record, CHECK, cursor ); if ( record.inUse() ) { count += count( record ); } } } return count; }
protected EntityImporter( BatchingNeoStores stores, Monitor monitor ) { this.propertyStore = stores.getPropertyStore(); this.propertyKeyTokenRepository = stores.getPropertyKeyRepository(); this.monitor = monitor; for ( int i = 0; i < propertyBlocks.length; i++ ) { propertyBlocks[i] = new PropertyBlock(); } this.propertyRecord = propertyStore.newRecord(); this.propertyIds = new BatchingIdGetter( propertyStore ); this.dynamicStringRecordAllocator = new StandardDynamicRecordAllocator( new BatchingIdGetter( propertyStore.getStringStore(), propertyStore.getStringStore().getRecordsPerPage() ), propertyStore.getStringStore().getRecordDataSize() ); this.dynamicArrayRecordAllocator = new StandardDynamicRecordAllocator( new BatchingIdGetter( propertyStore.getArrayStore(), propertyStore.getArrayStore().getRecordsPerPage() ), propertyStore.getStringStore().getRecordDataSize() ); }
PropertyRecord propertyRecord = propertyStore.newRecord(); try ( PageCursor cursor = nodeStore.openPageCursorForReading( 0 ); PageCursor propertyCursor = propertyStore.openPageCursorForReading( 0 ) )
PropertyRecord record = pStore.getRecord( id, pStore.newRecord(), NORMAL ); PropertyBlock block = record.getPropertyBlock( props.get( keyId ).first().propertyKeyId() ); StorageProperty data = block.newPropertyKeyValue( pStore );
PropertyRecord record = pStore.getRecord( id, pStore.newRecord(), NORMAL ); PropertyBlock block = record.getPropertyBlock( props.get( keyId ).first().propertyKeyId() ); StorageProperty data = block.newPropertyKeyValue( pStore );
PropertyRecord record = pStore.getRecord( id, pStore.newRecord(), NORMAL ); PropertyBlock block = record.getPropertyBlock( props.get( keyId ).first().propertyKeyId() ); StorageProperty data = block.newPropertyKeyValue( pStore );
PropertyRecord record = pStore.getRecord( id, pStore.newRecord(), NORMAL ); PropertyBlock block = record.getPropertyBlock( props.get( keyId ).first().propertyKeyId() ); StorageProperty data = block.newPropertyKeyValue( pStore );
record.setNextProp( AbstractBaseRecord.NO_ID ); stores.getNodeStore().updateRecord( record ); PropertyRecord propRecord = stores.getPropertyStore().getRecord( propId, stores.getPropertyStore().newRecord(), RecordLoad.NORMAL ); propRecord.setInUse( false ); stores.getPropertyStore().updateRecord( propRecord );
PropertyRecord record = propertyStore.newRecord();
record.setNextProp( AbstractBaseRecord.NO_ID ); stores.getRelationshipStore().updateRecord( record ); PropertyRecord propRecord = stores.getPropertyStore().getRecord( propId, stores.getPropertyStore().newRecord(), RecordLoad.NORMAL ); propRecord.setInUse( false ); stores.getPropertyStore().updateRecord( propRecord );
NodeInputIdPropertyLookup( PropertyStore propertyStore ) { this.propertyStore = propertyStore; this.propertyRecord = propertyStore.newRecord(); }
@Override public PropertyRecord load( long key, PrimitiveRecord additionalData ) { PropertyRecord record = store.getRecord( key, store.newRecord(), NORMAL ); setOwner( record, additionalData ); return record; }
public NodeImporter( BatchingNeoStores stores, IdMapper idMapper, Monitor monitor ) { super( stores, monitor ); this.labelTokenRepository = stores.getLabelRepository(); this.idMapper = idMapper; this.nodeStore = stores.getNodeStore(); this.nodeRecord = nodeStore.newRecord(); this.nodeIds = new BatchingIdGetter( nodeStore ); this.idPropertyStore = stores.getTemporaryPropertyStore(); this.idPropertyRecord = idPropertyStore.newRecord(); nodeRecord.setInUse( true ); }
protected EntityImporter( BatchingNeoStores stores, Monitor monitor ) { this.propertyStore = stores.getPropertyStore(); this.propertyKeyTokenRepository = stores.getPropertyKeyRepository(); this.monitor = monitor; for ( int i = 0; i < propertyBlocks.length; i++ ) { propertyBlocks[i] = new PropertyBlock(); } this.propertyRecord = propertyStore.newRecord(); this.propertyIds = new BatchingIdGetter( propertyStore ); this.dynamicStringRecordAllocator = new StandardDynamicRecordAllocator( new BatchingIdGetter( propertyStore.getStringStore(), propertyStore.getStringStore().getRecordsPerPage() ), propertyStore.getStringStore().getRecordDataSize() ); this.dynamicArrayRecordAllocator = new StandardDynamicRecordAllocator( new BatchingIdGetter( propertyStore.getArrayStore(), propertyStore.getArrayStore().getRecordsPerPage() ), propertyStore.getStringStore().getRecordDataSize() ); }