internal virtual void RemoveIndexDiff(MutableLongDiffSets diff) { if (_indexDiffs != null) { _indexDiffs.remove(diff); } }
public override void IndexDoUpdateEntry(SchemaDescriptor descriptor, long nodeId, ValueTuple propertiesBefore, ValueTuple propertiesAfter) { NodeStateImpl nodeState = GetOrCreateNodeState(nodeId); IDictionary <ValueTuple, MutableLongDiffSets> updates = GetOrCreateIndexUpdatesByDescriptor(descriptor); if (propertiesBefore != null) { MutableLongDiffSets before = GetOrCreateIndexUpdatesForSeek(updates, propertiesBefore); //noinspection ConstantConditions before.Remove(nodeId); if (before.Removed.contains(nodeId)) { nodeState.AddIndexDiff(before); } else { nodeState.RemoveIndexDiff(before); } } if (propertiesAfter != null) { MutableLongDiffSets after = GetOrCreateIndexUpdatesForSeek(updates, propertiesAfter); //noinspection ConstantConditions after.Add(nodeId); if (after.Added.contains(nodeId)) { nodeState.AddIndexDiff(after); } else { nodeState.RemoveIndexDiff(after); } } }
internal virtual void AddIndexDiff(MutableLongDiffSets diff) { if (_indexDiffs == null) { _indexDiffs = Collections.newSetFromMap(new IdentityHashMap <>()); } _indexDiffs.Add(diff); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void augmentDiffSetWithExternalElements() public virtual void AugmentDiffSetWithExternalElements() { MutableLongDiffSets diffSet = CreateDiffSet(); diffSet.AddAll(newSetWith(9L, 10L, 11L)); diffSet.RemoveAll(newSetWith(1L, 2L)); LongIterator augmentedIterator = diffSet.Augment(iterator(5L, 6L)); assertEquals(asSet(5L, 6L, 9L, 10L, 11L), toSet(augmentedIterator)); }
public override void Clear() { base.Clear(); if (_relationshipsAdded != null) { _relationshipsAdded.clear(); } if (_relationshipsRemoved != null) { _relationshipsRemoved.clear(); } if (_labelDiffSets != null) { _labelDiffSets = null; } if (_indexDiffs != null) { _indexDiffs.Clear(); } }