private void ConvertAndAssert(long[] before, long[] after, long[] expectedRemoved, long[] expectedAdded)
        {
            NodeLabelUpdate update = NodeLabelUpdate.labelChanges(0, before, after);

            PhysicalToLogicalLabelChanges.ConvertToAdditionsAndRemovals(update);
            assertArrayEquals(Terminate(update.LabelsBefore), expectedRemoved);
            assertArrayEquals(Terminate(update.LabelsAfter), expectedAdded);
        }
示例#2
0
        /// <summary>
        /// Queues a <seealso cref="NodeLabelUpdate"/> to this writer for applying when batch gets full,
        /// or when <seealso cref="close() closing"/>.
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void write(org.neo4j.kernel.api.labelscan.NodeLabelUpdate update) throws java.io.IOException
        public override void Write(NodeLabelUpdate update)
        {
            if (_pendingUpdatesCursor == _pendingUpdates.Length)
            {
                FlushPendingChanges();
            }

            _pendingUpdates[_pendingUpdatesCursor++] = update;
            PhysicalToLogicalLabelChanges.ConvertToAdditionsAndRemovals(update);
            CheckNextLabelId(update.LabelsBefore);
            CheckNextLabelId(update.LabelsAfter);
        }