Search in sources :

Example 11 with NeoStoreRecord

use of org.neo4j.kernel.impl.store.record.NeoStoreRecord in project neo4j by neo4j.

the class MetaDataStore method graphPropertyRecord.

public NeoStoreRecord graphPropertyRecord() {
    NeoStoreRecord result = new NeoStoreRecord();
    result.setNextProp(getGraphNextProp());
    return result;
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord)

Example 12 with NeoStoreRecord

use of org.neo4j.kernel.impl.store.record.NeoStoreRecord in project neo4j by neo4j.

the class PhysicalLogCommandReaderV2_1 method visitNeoStoreCommand.

private Command visitNeoStoreCommand(ReadableChannel channel) throws IOException {
    long nextProp = channel.getLong();
    NeoStoreRecord record = new NeoStoreRecord();
    record.setNextProp(nextProp);
    return new Command.NeoStoreCommand(null, record);
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord)

Example 13 with NeoStoreRecord

use of org.neo4j.kernel.impl.store.record.NeoStoreRecord in project neo4j by neo4j.

the class PhysicalLogCommandReaderV2_0 method visitNeoStoreCommand.

private Command visitNeoStoreCommand(ReadableChannel channel) throws IOException {
    long nextProp = channel.getLong();
    NeoStoreRecord record = new NeoStoreRecord();
    record.setNextProp(nextProp);
    return new Command.NeoStoreCommand(null, record);
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord)

Example 14 with NeoStoreRecord

use of org.neo4j.kernel.impl.store.record.NeoStoreRecord in project neo4j by neo4j.

the class PhysicalLogCommandReaderV2_2 method visitNeoStoreCommand.

private Command visitNeoStoreCommand(ReadableChannel channel) throws IOException {
    long nextProp = channel.getLong();
    NeoStoreRecord record = new NeoStoreRecord();
    record.setNextProp(nextProp);
    return new Command.NeoStoreCommand(null, record);
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord)

Example 15 with NeoStoreRecord

use of org.neo4j.kernel.impl.store.record.NeoStoreRecord in project neo4j by neo4j.

the class PhysicalLogCommandReaderV3_0Test method shouldReadNeoStoreCommand.

@Test
public void shouldReadNeoStoreCommand() throws Throwable {
    // Given
    InMemoryClosableChannel channel = new InMemoryClosableChannel();
    NeoStoreRecord before = new NeoStoreRecord();
    NeoStoreRecord after = new NeoStoreRecord();
    after.setNextProp(42);
    new Command.NeoStoreCommand(before, after).serialize(channel);
    // When
    PhysicalLogCommandReaderV3_0 reader = new PhysicalLogCommandReaderV3_0();
    Command command = reader.read(channel);
    assertTrue(command instanceof Command.NeoStoreCommand);
    Command.NeoStoreCommand neoStoreCommand = (Command.NeoStoreCommand) command;
    // Then
    assertEquals(before.getNextProp(), neoStoreCommand.getBefore().getNextProp());
    assertEquals(after.getNextProp(), neoStoreCommand.getAfter().getNextProp());
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord) InMemoryClosableChannel(org.neo4j.kernel.impl.transaction.log.InMemoryClosableChannel) Test(org.junit.Test)

Aggregations

NeoStoreRecord (org.neo4j.kernel.impl.store.record.NeoStoreRecord)36 Test (org.junit.Test)16 ConsistencyReport (org.neo4j.consistency.report.ConsistencyReport)9 Test (org.junit.jupiter.api.Test)5 RecordAccessStub (org.neo4j.consistency.store.RecordAccessStub)5 PropertyRecord (org.neo4j.kernel.impl.store.record.PropertyRecord)5 NodeRecord (org.neo4j.kernel.impl.store.record.NodeRecord)3 RelationshipRecord (org.neo4j.kernel.impl.store.record.RelationshipRecord)3 Command (org.neo4j.kernel.impl.transaction.command.Command)3 File (java.io.File)2 BatchTransactionApplier (org.neo4j.kernel.impl.api.BatchTransactionApplier)2 LabelTokenCommand (org.neo4j.kernel.impl.transaction.command.Command.LabelTokenCommand)2 PropertyKeyTokenCommand (org.neo4j.kernel.impl.transaction.command.Command.PropertyKeyTokenCommand)2 RelationshipTypeTokenCommand (org.neo4j.kernel.impl.transaction.command.Command.RelationshipTypeTokenCommand)2 InMemoryClosableChannel (org.neo4j.kernel.impl.transaction.log.InMemoryClosableChannel)2 PhysicalLogFile (org.neo4j.kernel.impl.transaction.log.PhysicalLogFile)2 PhysicalLogFiles (org.neo4j.kernel.impl.transaction.log.PhysicalLogFiles)2 LabelTokenRecord (org.neo4j.kernel.impl.store.record.LabelTokenRecord)1 PrimitiveRecord (org.neo4j.kernel.impl.store.record.PrimitiveRecord)1 PropertyKeyTokenRecord (org.neo4j.kernel.impl.store.record.PropertyKeyTokenRecord)1