Search in sources :

Example 16 with ValueTuple

use of org.neo4j.values.storable.ValueTuple 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);
    }
}
Also used : TrackableDiffSets.newMutableLongDiffSets(org.neo4j.kernel.impl.util.diffsets.TrackableDiffSets.newMutableLongDiffSets) MutableLongDiffSets(org.neo4j.kernel.impl.util.diffsets.MutableLongDiffSets) ValueTuple(org.neo4j.values.storable.ValueTuple)

Aggregations

ValueTuple (org.neo4j.values.storable.ValueTuple)16 Value (org.neo4j.values.storable.Value)11 LongDiffSets (org.neo4j.storageengine.api.txstate.LongDiffSets)8 Map (java.util.Map)7 NavigableMap (java.util.NavigableMap)7 MutableLongSet (org.eclipse.collections.api.set.primitive.MutableLongSet)7 UnmodifiableMap (org.eclipse.collections.impl.UnmodifiableMap)7 IndexDescriptor (org.neo4j.internal.schema.IndexDescriptor)6 TextValue (org.neo4j.values.storable.TextValue)6 SchemaDescriptor (org.neo4j.internal.schema.SchemaDescriptor)5 MemoryTracker (org.neo4j.memory.MemoryTracker)5 MutableLongList (org.eclipse.collections.api.list.primitive.MutableLongList)4 Test (org.junit.jupiter.api.Test)2 MutableLongDiffSets (org.neo4j.kernel.impl.util.diffsets.MutableLongDiffSets)2 ArrayList (java.util.ArrayList)1 Collections (java.util.Collections)1 HashSet (java.util.HashSet)1 LongIterable (org.eclipse.collections.api.LongIterable)1 LongProcedure (org.eclipse.collections.api.block.procedure.primitive.LongProcedure)1 MutableList (org.eclipse.collections.api.list.MutableList)1