use of org.neo4j.kernel.impl.util.diffsets.MutableLongDiffSets in project neo4j by neo4j.
the class TxStateTest method getOrCreateTypeStateRelationshipDiffSets_useCollectionsFactory.
@Test
void getOrCreateTypeStateRelationshipDiffSets_useCollectionsFactory() {
final MutableLongDiffSets diffSets = state.getOrCreateTypeStateRelationshipDiffSets(1);
diffSets.add(1);
diffSets.remove(2);
verify(collectionsFactory, times(2)).newLongSet(memoryTracker);
verifyNoMoreInteractions(collectionsFactory);
}
use of org.neo4j.kernel.impl.util.diffsets.MutableLongDiffSets in project neo4j by neo4j.
the class TxStateTest method getOrCreateLabelStateNodeDiffSets_useCollectionsFactory.
@Test
void getOrCreateLabelStateNodeDiffSets_useCollectionsFactory() {
final MutableLongDiffSets diffSets = state.getOrCreateLabelStateNodeDiffSets(1);
diffSets.add(1);
diffSets.remove(2);
verify(collectionsFactory, times(2)).newLongSet(memoryTracker);
verifyNoMoreInteractions(collectionsFactory);
}
use of org.neo4j.kernel.impl.util.diffsets.MutableLongDiffSets in project neo4j by neo4j.
the class TxStateTest method getOrCreateIndexUpdatesForSeek_useCollectionsFactory.
@Test
void getOrCreateIndexUpdatesForSeek_useCollectionsFactory() {
final MutableLongDiffSets diffSets = state.getOrCreateIndexUpdatesForSeek(new HashMap<>(), ValueTuple.of(stringValue("test")));
diffSets.add(1);
diffSets.remove(2);
verify(collectionsFactory, times(2)).newLongSet(memoryTracker);
verifyNoMoreInteractions(collectionsFactory);
}
use of org.neo4j.kernel.impl.util.diffsets.MutableLongDiffSets in project neo4j by neo4j.
the class TxState method indexDoUpdateEntry.
@Override
public void indexDoUpdateEntry(SchemaDescriptor descriptor, long entityIdId, ValueTuple propertiesBefore, ValueTuple propertiesAfter) {
Map<ValueTuple, MutableLongDiffSets> updates = getOrCreateIndexUpdatesByDescriptor(descriptor);
if (propertiesBefore != null) {
MutableLongDiffSets before = getOrCreateIndexUpdatesForSeek(updates, propertiesBefore);
before.remove(entityIdId);
}
if (propertiesAfter != null) {
MutableLongDiffSets after = getOrCreateIndexUpdatesForSeek(updates, propertiesAfter);
after.add(entityIdId);
}
}
Aggregations