@Override public void read( RECORD record, PageCursor cursor, RecordLoad mode, int recordSize ) { byte inUseByte = cursor.getByte(); boolean inUse = isInUse( inUseByte ); record.setInUse( inUse ); if ( mode.shouldLoad( inUse ) ) { readRecordData( cursor, record, inUse ); } }
@Override public void read( NodeRecord record, PageCursor cursor, RecordLoad mode, int recordSize ) { byte headerByte = cursor.getByte(); boolean inUse = isInUse( headerByte ); record.setInUse( inUse ); if ( mode.shouldLoad( inUse ) ) { long nextRel = cursor.getInt() & 0xFFFFFFFFL; long nextProp = cursor.getInt() & 0xFFFFFFFFL; long relModifier = (headerByte & 0xEL) << 31; long propModifier = (headerByte & 0xF0L) << 28; long lsbLabels = cursor.getInt() & 0xFFFFFFFFL; long hsbLabels = cursor.getByte() & 0xFF; // so that a negative byte won't fill the "extended" bits with ones. long labels = lsbLabels | (hsbLabels << 32); byte extra = cursor.getByte(); boolean dense = (extra & 0x1) > 0; record.initialize( inUse, BaseRecordFormat.longFromIntAndMod( nextProp, propModifier ), dense, BaseRecordFormat.longFromIntAndMod( nextRel, relModifier ), labels ); } else { int nextOffset = cursor.getOffset() + recordSize - HEADER_SIZE; cursor.setOffset( nextOffset ); } }
boolean inUse = isInUse( (byte) headerByte ); record.setInUse( inUse ); if ( mode.shouldLoad( inUse ) )
boolean isStartRecord = (firstInteger & 0x80000000) == 0; boolean inUse = (firstInteger & 0x10000000) != 0; if ( mode.shouldLoad( inUse ) )
boolean inUse = isInUse( headerByte ); record.setInUse( inUse ); if ( mode.shouldLoad( inUse ) )
@Override public void read( RECORD record, PageCursor cursor, RecordLoad mode, int recordSize ) { byte inUseByte = cursor.getByte(); boolean inUse = isInUse( inUseByte ); record.setInUse( inUse ); if ( mode.shouldLoad( inUse ) ) { readRecordData( cursor, record, inUse ); } }
@Override public void read( DynamicRecord record, PageCursor cursor, RecordLoad mode, int recordSize ) { byte headerByte = cursor.getByte(); boolean inUse = isInUse( headerByte ); if ( mode.shouldLoad( inUse ) ) { int length = cursor.getShort() | cursor.getByte() << 16; if ( length > recordSize | length < 0 ) { cursor.setCursorException( payloadLengthErrorMessage( record, recordSize, length ) ); return; } long next = cursor.getLong(); boolean isStartRecord = (headerByte & START_RECORD_BIT) != 0; record.initialize( inUse, isStartRecord, next, -1, length ); readData( record, cursor ); } else { record.setInUse( inUse ); } }
@Override public void read( NodeRecord record, PageCursor cursor, RecordLoad mode, int recordSize ) { byte headerByte = cursor.getByte(); boolean inUse = isInUse( headerByte ); record.setInUse( inUse ); if ( mode.shouldLoad( inUse ) ) { long nextRel = cursor.getInt() & 0xFFFFFFFFL; long nextProp = cursor.getInt() & 0xFFFFFFFFL; long relModifier = (headerByte & 0xEL) << 31; long propModifier = (headerByte & 0xF0L) << 28; long lsbLabels = cursor.getInt() & 0xFFFFFFFFL; long hsbLabels = cursor.getByte() & 0xFF; // so that a negative byte won't fill the "extended" bits with ones. long labels = lsbLabels | (hsbLabels << 32); byte extra = cursor.getByte(); boolean dense = (extra & 0x1) > 0; record.initialize( inUse, BaseRecordFormat.longFromIntAndMod( nextProp, propModifier ), dense, BaseRecordFormat.longFromIntAndMod( nextRel, relModifier ), labels ); } else { int nextOffset = cursor.getOffset() + recordSize - HEADER_SIZE; cursor.setOffset( nextOffset ); } }
@Override public void read( PropertyRecord record, PageCursor cursor, RecordLoad mode, int recordSize ) { int offset = cursor.getOffset(); byte headerByte = cursor.getByte(); boolean inUse = isInUse( headerByte ); if ( mode.shouldLoad( inUse ) ) { int blockCount = headerByte >>> 4; long recordId = record.getId(); record.initialize( inUse, toAbsolute( Reference.decode( cursor ), recordId ), toAbsolute( Reference.decode( cursor ), recordId ) ); if ( (blockCount > record.getBlockCapacity()) | (RECORD_SIZE - (cursor.getOffset() - offset) < blockCount * Long.BYTES) ) { cursor.setCursorException( "PropertyRecord claims to contain more blocks than can fit in a record" ); return; } while ( blockCount-- > 0 ) { record.addLoadedBlock( cursor.getLong() ); } } }
boolean isStartRecord = (firstInteger & 0x80000000) == 0; boolean inUse = (firstInteger & 0x10000000) != 0; if ( mode.shouldLoad( inUse ) )
boolean inUse = isInUse( (byte) headerByte ); record.setInUse( inUse ); if ( mode.shouldLoad( inUse ) )
boolean inUse = isInUse( headerByte ); boolean useFixedReferences = has( headerByte, HEADER_BIT_FIXED_REFERENCE ); if ( mode.shouldLoad( inUse ) )
boolean inUse = isInUse( headerByte ); boolean useFixedReferences = has( headerByte, HEADER_BIT_FIXED_REFERENCE ); if ( mode.shouldLoad( inUse ) )
boolean inUse = isInUse( headerByte ); boolean useFixedReferences = has( headerByte, HEADER_BIT_FIXED_REFERENCE ); if ( mode.shouldLoad( inUse ) )
boolean inUse = isInUse( headerByte ); boolean useFixedReferences = has( headerByte, HEADER_BIT_FIXED_REFERENCE ); if ( mode.shouldLoad( inUse ) )
boolean inUse = isInUse( headerByte ); record.setInUse( inUse ); if ( mode.shouldLoad( inUse ) )