NativeLabelScanWriter( int batchSize, WriteMonitor monitor ) { this.pendingUpdates = new NodeLabelUpdate[batchSize]; this.addMerger = ( existingKey, newKey, existingValue, newValue ) -> { monitor.mergeAdd( existingValue, newValue ); return existingValue.add( newValue ); }; this.removeMerger = ( existingKey, newKey, existingValue, newValue ) -> { monitor.mergeRemove( existingValue, newValue ); return existingValue.remove( newValue ); }; this.monitor = monitor; }
NativeLabelScanWriter( int batchSize, WriteMonitor monitor ) { this.pendingUpdates = new NodeLabelUpdate[batchSize]; this.addMerger = ( existingKey, newKey, existingValue, newValue ) -> { monitor.mergeAdd( existingValue, newValue ); return existingValue.add( newValue ); }; this.removeMerger = ( existingKey, newKey, existingValue, newValue ) -> { monitor.mergeRemove( existingValue, newValue ); return existingValue.remove( newValue ); }; this.monitor = monitor; }