use of org.neo4j.kernel.impl.store.record.RelationshipGroupRecord in project neo4j by neo4j.
the class PhysicalLogCommandReaderV3_0_2 method readRelationshipGroupRecord.
private RelationshipGroupRecord readRelationshipGroupRecord(long id, ReadableChannel channel) throws IOException {
byte flags = channel.get();
boolean inUse = bitFlag(flags, Record.IN_USE.byteValue());
boolean requireSecondaryUnit = bitFlag(flags, Record.REQUIRE_SECONDARY_UNIT);
boolean hasSecondaryUnit = bitFlag(flags, Record.HAS_SECONDARY_UNIT);
int type = shortToUnsignedInt(channel.getShort());
RelationshipGroupRecord record = new RelationshipGroupRecord(id, type);
record.setInUse(inUse);
record.setNext(channel.getLong());
record.setFirstOut(channel.getLong());
record.setFirstIn(channel.getLong());
record.setFirstLoop(channel.getLong());
record.setOwningNode(channel.getLong());
record.setRequiresSecondaryUnit(requireSecondaryUnit);
if (hasSecondaryUnit) {
record.setSecondaryUnitId(channel.getLong());
}
return record;
}
use of org.neo4j.kernel.impl.store.record.RelationshipGroupRecord in project neo4j by neo4j.
the class PhysicalLogCommandReaderV2_2 method visitRelationshipGroupCommand.
private Command visitRelationshipGroupCommand(ReadableChannel channel) throws IOException {
long id = channel.getLong();
byte inUseByte = channel.get();
boolean inUse = inUseByte == Record.IN_USE.byteValue();
if (inUseByte != Record.IN_USE.byteValue() && inUseByte != Record.NOT_IN_USE.byteValue()) {
throw new IOException("Illegal in use flag: " + inUseByte);
}
int type = shortToUnsignedInt(channel.getShort());
RelationshipGroupRecord record = new RelationshipGroupRecord(id, type);
record.setInUse(inUse);
record.setNext(channel.getLong());
record.setFirstOut(channel.getLong());
record.setFirstIn(channel.getLong());
record.setFirstLoop(channel.getLong());
record.setOwningNode(channel.getLong());
return new Command.RelationshipGroupCommand(null, record);
}
use of org.neo4j.kernel.impl.store.record.RelationshipGroupRecord in project neo4j by neo4j.
the class RelationshipCreator method connectRelationshipToDenseNode.
private void connectRelationshipToDenseNode(NodeRecord node, RelationshipRecord rel, RecordAccess<Long, RelationshipRecord, Void> relRecords, RecordAccess<Long, RelationshipGroupRecord, Integer> relGroupRecords, ResourceLocker locks) {
RelationshipGroupRecord group = relGroupGetter.getOrCreateRelationshipGroup(node, rel.getType(), relGroupRecords).forChangingData();
DirectionWrapper dir = DirectionIdentifier.wrapDirection(rel, node);
long nextRel = dir.getNextRel(group);
setCorrectNextRel(node, rel, nextRel);
connect(node.getId(), nextRel, rel, relRecords, locks);
dir.setNextRel(group, rel.getId());
}
use of org.neo4j.kernel.impl.store.record.RelationshipGroupRecord in project neo4j by neo4j.
the class PhysicalLogCommandReaderV3_0 method visitRelationshipGroupCommand.
private Command visitRelationshipGroupCommand(ReadableChannel channel) throws IOException {
long id = channel.getLong();
RelationshipGroupRecord before = readRelationshipGroupRecord(id, channel);
RelationshipGroupRecord after = readRelationshipGroupRecord(id, channel);
return new Command.RelationshipGroupCommand(before, after);
}
use of org.neo4j.kernel.impl.store.record.RelationshipGroupRecord in project neo4j by neo4j.
the class PhysicalLogCommandReaderV3_0_2 method visitRelationshipGroupCommand.
private Command visitRelationshipGroupCommand(ReadableChannel channel) throws IOException {
long id = channel.getLong();
RelationshipGroupRecord before = readRelationshipGroupRecord(id, channel);
RelationshipGroupRecord after = readRelationshipGroupRecord(id, channel);
return new Command.RelationshipGroupCommand(before, after);
}
Aggregations