Search in sources :

Example 1 with UnmodifiableMap

use of org.eclipse.collections.impl.UnmodifiableMap in project neo4j by neo4j.

the class TxStateIndexChanges method indexUpdatesWithValuesForSeek.

static AddedWithValuesAndRemoved indexUpdatesWithValuesForSeek(ReadableTransactionState txState, IndexDescriptor descriptor, ValueTuple values) {
    UnmodifiableMap<ValueTuple, ? extends LongDiffSets> updates = txState.getIndexUpdates(descriptor.schema());
    if (updates != null) {
        LongDiffSets indexUpdatesForSeek = updates.get(values);
        if (indexUpdatesForSeek == null) {
            return EMPTY_ADDED_AND_REMOVED_WITH_VALUES;
        }
        Value[] valueArray = values.getValues();
        MutableList<EntityWithPropertyValues> added = Lists.mutable.empty();
        indexUpdatesForSeek.getAdded().forEach((LongProcedure) l -> added.add(new EntityWithPropertyValues(l, valueArray)));
        return new AddedWithValuesAndRemoved(added, indexUpdatesForSeek.getRemoved());
    }
    return EMPTY_ADDED_AND_REMOVED_WITH_VALUES;
}
Also used : IndexOrder(org.neo4j.internal.schema.IndexOrder) NO_VALUE(org.neo4j.values.storable.Values.NO_VALUE) LongDiffSets(org.neo4j.storageengine.api.txstate.LongDiffSets) ReadableTransactionState(org.neo4j.storageengine.api.txstate.ReadableTransactionState) ValueTuple(org.neo4j.values.storable.ValueTuple) LongLists(org.eclipse.collections.impl.factory.primitive.LongLists) Value(org.neo4j.values.storable.Value) TextValue(org.neo4j.values.storable.TextValue) MutableLongList(org.eclipse.collections.api.list.primitive.MutableLongList) NavigableMap(java.util.NavigableMap) MutableList(org.eclipse.collections.api.list.MutableList) Values(org.neo4j.values.storable.Values) MutableLongSet(org.eclipse.collections.api.set.primitive.MutableLongSet) LongProcedure(org.eclipse.collections.api.block.procedure.primitive.LongProcedure) Lists(org.eclipse.collections.impl.factory.Lists) Map(java.util.Map) LongIterable(org.eclipse.collections.api.LongIterable) LongSets(org.eclipse.collections.impl.factory.primitive.LongSets) PropertyIndexQuery(org.neo4j.internal.kernel.api.PropertyIndexQuery) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) ValueGroup(org.neo4j.values.storable.ValueGroup) LongSet(org.eclipse.collections.api.set.primitive.LongSet) Collections(java.util.Collections) UnmodifiableMap(org.eclipse.collections.impl.UnmodifiableMap) ValueTuple(org.neo4j.values.storable.ValueTuple) Value(org.neo4j.values.storable.Value) TextValue(org.neo4j.values.storable.TextValue) LongDiffSets(org.neo4j.storageengine.api.txstate.LongDiffSets)

Aggregations

Collections (java.util.Collections)1 Map (java.util.Map)1 NavigableMap (java.util.NavigableMap)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 MutableLongList (org.eclipse.collections.api.list.primitive.MutableLongList)1 LongSet (org.eclipse.collections.api.set.primitive.LongSet)1 MutableLongSet (org.eclipse.collections.api.set.primitive.MutableLongSet)1 UnmodifiableMap (org.eclipse.collections.impl.UnmodifiableMap)1 Lists (org.eclipse.collections.impl.factory.Lists)1 LongLists (org.eclipse.collections.impl.factory.primitive.LongLists)1 LongSets (org.eclipse.collections.impl.factory.primitive.LongSets)1 PropertyIndexQuery (org.neo4j.internal.kernel.api.PropertyIndexQuery)1 IndexDescriptor (org.neo4j.internal.schema.IndexDescriptor)1 IndexOrder (org.neo4j.internal.schema.IndexOrder)1 LongDiffSets (org.neo4j.storageengine.api.txstate.LongDiffSets)1 ReadableTransactionState (org.neo4j.storageengine.api.txstate.ReadableTransactionState)1 TextValue (org.neo4j.values.storable.TextValue)1 Value (org.neo4j.values.storable.Value)1