@Test public void testRemoveOp() throws IOException, InterruptedException { final NNProcessor<Integer, Integer> processor = buildProcessor(); runProcess(processor, new CompleteNotifier<Integer>() { @Override public void complete( final ByteArray id, final Integer value, final NeighborList<Integer> list) throws IOException, InterruptedException { processor.remove(id); } }); }
public void remove(final ByteArray id) { final Set<PartitionData> partitionSet = idsToPartition.remove(id); if (partitionSet != null) { for (final PartitionData pd : partitionSet) { final Set<ByteArray> idSet = partitionsToIds.get(pd); if (idSet != null) { idSet.remove(id); } } } primaries.remove(id); others.remove(id); if (index != null) { index.empty(id); } }
NNProcessor { public void remove(final ByteArray id) { final Set<PartitionData> partitionSet = idsToPartition.remove(id); if (partitionSet != null) { for (final PartitionData pd : partitionSet) { final Set<ByteArray> idSet = partitionsToIds.get(pd); if (idSet != null) { idSet.remove(id); } } } primaries.remove(id); others.remove(id); if (index != null) { index.empty(id); } } }
NNProcessor { public void remove(final ByteArray id) { final Set<PartitionData> partitionSet = idsToPartition.remove(id); if (partitionSet != null) { for (final PartitionData pd : partitionSet) { final Set<ByteArray> idSet = partitionsToIds.get(pd); if (idSet != null) { idSet.remove(id); } } } primaries.remove(id); others.remove(id); if (index != null) { index.empty(id); } } NNProcessor(
      final Partitioner<Object> partitioner,
      final TypeConverter<STORE_VALUE> typeConverter,
      final DistanceProfileGenerateFn<?, STORE_VALUE> distanceProfileFn,
      final double maxDistance,
      final PartitionData parentPartition); }
NNProcessor { public void remove(final ByteArray id) { final Set<PartitionData> partitionSet = idsToPartition.remove(id); if (partitionSet != null) { for (final PartitionData pd : partitionSet) { final Set<ByteArray> idSet = partitionsToIds.get(pd); if (idSet != null) { idSet.remove(id); } } } primaries.remove(id); others.remove(id); if (index != null) { index.empty(id); } } NNProcessor(
      final Partitioner<Object> partitioner,
      final TypeConverter<STORE_VALUE> typeConverter,
      final DistanceProfileGenerateFn<?, STORE_VALUE> distanceProfileFn,
      final double maxDistance,
      final PartitionData parentPartition); void remove(final ByteArray id); void add(final ByteArray id, final boolean isPrimary, final PARTITION_VALUE partitionValue); int size(); boolean trimSmallPartitions(final int size); void process(
      final NeighborListFactory<STORE_VALUE> listFactory,
      final CompleteNotifier<STORE_VALUE> notification); int getUpperBoundPerPartition(); void setUpperBoundPerPartition(final int upperBoundPerPartition); }
NNProcessor { public void remove(final ByteArray id) { final Set<PartitionData> partitionSet = idsToPartition.remove(id); if (partitionSet != null) { for (final PartitionData pd : partitionSet) { final Set<ByteArray> idSet = partitionsToIds.get(pd); if (idSet != null) { idSet.remove(id); } } } primaries.remove(id); others.remove(id); if (index != null) { index.empty(id); } } NNProcessor(
      final Partitioner<Object> partitioner,
      final TypeConverter<STORE_VALUE> typeConverter,
      final DistanceProfileGenerateFn<?, STORE_VALUE> distanceProfileFn,
      final double maxDistance,
      final PartitionData parentPartition); void remove(final ByteArray id); void add(final ByteArray id, final boolean isPrimary, final PARTITION_VALUE partitionValue); int size(); boolean trimSmallPartitions(final int size); void process(
      final NeighborListFactory<STORE_VALUE> listFactory,
      final CompleteNotifier<STORE_VALUE> notification); int getUpperBoundPerPartition(); void setUpperBoundPerPartition(final int upperBoundPerPartition); static final int DEFAULT_UPPER_BOUND_PARTIION_SIZE; }