private RawCursor<Hit<LabelScanKey,LabelScanValue>,IOException> seekerForLabel( long startId, int labelId ) throws IOException { LabelScanKey from = new LabelScanKey( labelId, rangeOf( startId ) ); LabelScanKey to = new LabelScanKey( labelId, Long.MAX_VALUE ); return index.seek( from, to ); }
private void change( long currentLabelId, long nodeId, boolean add, long txId ) throws IOException { int labelId = toIntExact( currentLabelId ); long idRange = rangeOf( nodeId ); if ( labelId != key.labelId || idRange != key.idRange || addition != add ) { flushPendingRange(); // Set key to current and reset value key.labelId = labelId; key.idRange = idRange; addition = add; monitor.range( idRange, labelId ); } int offset = toIntExact( nodeId % RANGE_SIZE ); value.set( offset ); if ( addition ) { monitor.prepareAdd( txId, offset ); } else { monitor.prepareRemove( txId, offset ); } }
long range = rangeOf( fromId ); if ( range == hit.key().idRange )
private RawCursor<Hit<LabelScanKey,LabelScanValue>,IOException> seekerForLabel( long startId, int labelId ) throws IOException { LabelScanKey from = new LabelScanKey( labelId, rangeOf( startId ) ); LabelScanKey to = new LabelScanKey( labelId, Long.MAX_VALUE ); return index.seek( from, to ); }
private void change( long currentLabelId, long nodeId, boolean add, long txId ) throws IOException { int labelId = toIntExact( currentLabelId ); long idRange = rangeOf( nodeId ); if ( labelId != key.labelId || idRange != key.idRange || addition != add ) { flushPendingRange(); // Set key to current and reset value key.labelId = labelId; key.idRange = idRange; addition = add; monitor.range( idRange, labelId ); } int offset = toIntExact( nodeId % RANGE_SIZE ); value.set( offset ); if ( addition ) { monitor.prepareAdd( txId, offset ); } else { monitor.prepareRemove( txId, offset ); } }
long range = rangeOf( fromId ); if ( range == hit.key().idRange )