use of org.neo4j.kernel.impl.store.record.RelationshipTypeTokenRecord in project neo4j by neo4j.
the class PhysicalLogCommandReaderV3_0_2 method visitRelationshipTypeTokenCommand.
private Command visitRelationshipTypeTokenCommand(ReadableChannel channel) throws IOException {
int id = channel.getInt();
RelationshipTypeTokenRecord before = readRelationshipTypeTokenRecord(id, channel);
if (before == null) {
return null;
}
RelationshipTypeTokenRecord after = readRelationshipTypeTokenRecord(id, channel);
if (after == null) {
return null;
}
return new Command.RelationshipTypeTokenCommand(before, after);
}
use of org.neo4j.kernel.impl.store.record.RelationshipTypeTokenRecord in project neo4j by neo4j.
the class PhysicalLogCommandReaderV2_2 method visitRelationshipTypeTokenCommand.
private Command visitRelationshipTypeTokenCommand(ReadableChannel channel) throws IOException {
// id+in_use(byte)+type_blockId(int)+nr_type_records(int)
int id = channel.getInt();
byte inUseFlag = channel.get();
boolean inUse = false;
if ((inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue()) {
inUse = true;
} else if (inUseFlag != Record.NOT_IN_USE.byteValue()) {
throw new IOException("Illegal in use flag: " + inUseFlag);
}
RelationshipTypeTokenRecord record = new RelationshipTypeTokenRecord(id);
record.setInUse(inUse);
record.setNameId(channel.getInt());
int nrTypeRecords = channel.getInt();
for (int i = 0; i < nrTypeRecords; i++) {
DynamicRecord dr = readDynamicRecord(channel);
if (dr == null) {
return null;
}
record.addNameRecord(dr);
}
return new Command.RelationshipTypeTokenCommand(null, record);
}
use of org.neo4j.kernel.impl.store.record.RelationshipTypeTokenRecord in project neo4j by neo4j.
the class PhysicalLogCommandReaderV3_0 method visitRelationshipTypeTokenCommand.
private Command visitRelationshipTypeTokenCommand(ReadableChannel channel) throws IOException {
int id = channel.getInt();
RelationshipTypeTokenRecord before = readRelationshipTypeTokenRecord(id, channel);
if (before == null) {
return null;
}
RelationshipTypeTokenRecord after = readRelationshipTypeTokenRecord(id, channel);
if (after == null) {
return null;
}
return new Command.RelationshipTypeTokenCommand(before, after);
}
use of org.neo4j.kernel.impl.store.record.RelationshipTypeTokenRecord in project neo4j by neo4j.
the class PhysicalLogCommandReaderV2_2_10 method visitRelationshipTypeTokenCommand.
private Command visitRelationshipTypeTokenCommand(ReadableChannel channel) throws IOException {
// id+in_use(byte)+type_blockId(int)+nr_type_records(int)
int id = channel.getInt();
byte inUseFlag = channel.get();
boolean inUse = false;
if ((inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue()) {
inUse = true;
} else if (inUseFlag != Record.NOT_IN_USE.byteValue()) {
throw new IOException("Illegal in use flag: " + inUseFlag);
}
RelationshipTypeTokenRecord record = new RelationshipTypeTokenRecord(id);
record.setInUse(inUse);
record.setNameId(channel.getInt());
int nrTypeRecords = channel.getInt();
for (int i = 0; i < nrTypeRecords; i++) {
DynamicRecord dr = readDynamicRecord(channel);
if (dr == null) {
return null;
}
record.addNameRecord(dr);
}
return new Command.RelationshipTypeTokenCommand(null, record);
}
use of org.neo4j.kernel.impl.store.record.RelationshipTypeTokenRecord in project neo4j by neo4j.
the class PhysicalLogCommandReaderV3_0 method readRelationshipTypeTokenRecord.
private RelationshipTypeTokenRecord readRelationshipTypeTokenRecord(int id, ReadableChannel channel) throws IOException {
// in_use(byte)+type_blockId(int)+nr_type_records(int)
byte inUseFlag = channel.get();
boolean inUse = false;
if ((inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue()) {
inUse = true;
} else if (inUseFlag != Record.NOT_IN_USE.byteValue()) {
throw new IOException("Illegal in use flag: " + inUseFlag);
}
RelationshipTypeTokenRecord record = new RelationshipTypeTokenRecord(id);
record.setInUse(inUse);
record.setNameId(channel.getInt());
int nrTypeRecords = channel.getInt();
for (int i = 0; i < nrTypeRecords; i++) {
DynamicRecord dr = readDynamicRecord(channel);
if (dr == null) {
return null;
}
record.addNameRecord(dr);
}
return record;
}
Aggregations