internal WorkSyncedNativeIndexPopulator(NativeIndexPopulator <KEY, VALUE> actual)
 {
     if (!InstanceFieldsInitialized)
     {
         InitializeInstanceFields();
         InstanceFieldsInitialized = true;
     }
     this._actual = actual;
 }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void applyInterleaved(org.neo4j.kernel.api.index.IndexEntryUpdate<org.neo4j.storageengine.api.schema.IndexDescriptor>[] updates, NativeIndexPopulator<KEY,VALUE> populator) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
        private void ApplyInterleaved(IndexEntryUpdate <IndexDescriptor>[] updates, NativeIndexPopulator <KEY, VALUE> populator)
        {
            bool useUpdater = true;
            ICollection <IndexEntryUpdate <IndexDescriptor> > populatorBatch = new List <IndexEntryUpdate <IndexDescriptor> >();
            IndexUpdater updater = populator.NewPopulatingUpdater(NullPropertyAccessor);

            foreach (IndexEntryUpdate <IndexDescriptor> update in updates)
            {
                if (random.Next(100) < 20)
                {
                    if (useUpdater)
                    {
                        updater.Close();
                        populatorBatch = new List <IndexEntryUpdate <IndexDescriptor> >();
                    }
                    else
                    {
                        populator.Add(populatorBatch);
                        updater = populator.NewPopulatingUpdater(NullPropertyAccessor);
                    }
                    useUpdater = !useUpdater;
                }
                if (useUpdater)
                {
                    updater.Process(update);
                }
                else
                {
                    populatorBatch.Add(update);
                }
            }
            if (useUpdater)
            {
                updater.Close();
            }
            else
            {
                populator.Add(populatorBatch);
            }
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setupPopulator() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void SetupPopulator()
        {
            Populator = CreatePopulator();
        }