@Deprecated public NodeRecord( long id, boolean dense, long nextRel, long nextProp, boolean inUse ) { this( id, dense, nextRel, nextProp ); setInUse( inUse ); }
@Deprecated public NodeRecord( long id, boolean inUse, boolean dense, long nextRel, long nextProp, long labels ) { super( id, nextProp ); this.nextRel = nextRel; this.dense = dense; this.labels = labels; setInUse( inUse ); }
MyPrimitiveProxy() { record.setInUse( true ); }
private static NodeRecord inUseNode() { NodeRecord record = new NodeRecord( 1, false, -1, -1 ); record.setInUse( true ); return record; }
public void update( NodeRecord before, NodeRecord node ) { node.setInUse( true ); add( before, node ); }
private NodeRecord newUsedNodeRecord( long id ) { NodeRecord node = new NodeRecord( id ); node.setInUse( true ); return node; } }
private static NodeRecord node( long nextId ) { NodeRecord node = new NodeRecord( nextId ); node.setInUse( true ); return node; } }
/** * Creates a node for the given id * * @param nodeId The id of the node to create. */ public void nodeCreate( long nodeId ) { NodeRecord nodeRecord = recordChangeSet.getNodeRecords().create( nodeId, null ).forChangingData(); nodeRecord.setInUse( true ); nodeRecord.setCreated(); }
private Collection<StorageCommand> singleCreateNodeCommand() { Collection<StorageCommand> commands = new ArrayList<>(); long id = 0; NodeRecord before = new NodeRecord( id ); NodeRecord after = new NodeRecord( id ); after.setInUse( true ); commands.add( new Command.NodeCommand( before, after ) ); return commands; }
private static NodeRecord createdNode() { NodeRecord record = new NodeRecord( 2, false, -1, -1 ); record.setInUse( true ); record.setCreated(); return record; }
private Collection<StorageCommand> singleCreateNodeCommand( long id ) { Collection<StorageCommand> commands = new ArrayList<>(); NodeRecord before = new NodeRecord( id ); NodeRecord after = new NodeRecord( id ); after.setInUse( true ); commands.add( new NodeCommand( before, after ) ); return commands; }
@Override protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx, GraphStoreFixture.IdGenerator next ) { NodeRecord node = new NodeRecord( 42, false, -1, -1 ); node.setInUse( true ); node.setLabelField( inlinedLabelsLongRepresentation( label1, label2 ), Collections.emptySet() ); tx.create( node ); } } );
@Test public void shouldSerializeUpdatedRecord() throws Exception { // Given NodeRecord before = new NodeRecord( 12, false, 1, 2 ); before.setInUse( true ); NodeRecord after = new NodeRecord( 12, false, 2, 1 ); after.setInUse( true ); // When assertSerializationWorksFor( new Command.NodeCommand( before, after ) ); }
@Test public void shouldSerializeDenseRecord() throws Exception { // Given NodeRecord before = new NodeRecord( 12, false, 1, 2 ); before.setInUse( true ); NodeRecord after = new NodeRecord( 12, true, 2, 1 ); after.setInUse( true ); // When assertSerializationWorksFor( new Command.NodeCommand( before, after ) ); }
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 TransactionToApply tx() { NodeRecord before = new NodeRecord( 0 ); NodeRecord after = new NodeRecord( 0 ); after.setInUse( true ); Command.NodeCommand nodeCommand = new Command.NodeCommand( before, after ); PhysicalTransactionRepresentation tx = new PhysicalTransactionRepresentation( singletonList( nodeCommand ) ); tx.setHeader( new byte[0], 0, 0, 0, 0, 0, 0 ); return new TransactionToApply( tx ); }
@Override protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx, GraphStoreFixture.IdGenerator next ) { NodeRecord node = new NodeRecord( 42, false, -1, -1 ); node.setInUse( true ); List<DynamicRecord> dynamicRecords; dynamicRecords = pair.first(); labels.addAll( pair.other() ); node.setLabelField( dynamicPointer( dynamicRecords ), dynamicRecords ); tx.create( node ); } } );
public void delete( NodeRecord node ) { node.setInUse( false ); add( node, new NodeRecord( node.getId(), false, NO_PREV_RELATIONSHIP.intValue(), NO_NEXT_PROPERTY.intValue() ) ); }
@Test public void shouldSerializeCreatedRecord() throws Exception { // Given NodeRecord before = new NodeRecord( 12, false, 1, 2 ); NodeRecord after = new NodeRecord( 12, false, 2, 1 ); after.setCreated(); after.setInUse( true ); // When assertSerializationWorksFor( new Command.NodeCommand( before, after ) ); }
public static NodeCommand createNode( long id, long... dynamicLabelRecordIds ) { NodeRecord record = new NodeRecord( id ); record.setInUse( true ); record.setCreated(); if ( dynamicLabelRecordIds.length > 0 ) { Collection<DynamicRecord> dynamicRecords = dynamicRecords( dynamicLabelRecordIds ); record.setLabelField( DynamicNodeLabels.dynamicPointer( dynamicRecords ), dynamicRecords ); } return new NodeCommand( new NodeRecord( id ), record ); }