/// <summary>
        /// Populates external updates from the update queue if there are {@code queueThreshold} or more queued updates.
        /// </summary>
        /// <returns> whether or not there were external updates applied. </returns>
        internal virtual bool PopulateFromQueue(int queueThreshold, long currentlyIndexedNodeId)
        {
            int queueSize = UpdatesQueue.Count;

            if (queueSize > 0 && queueSize >= queueThreshold)
            {
                if (PrintDebug)
                {
                    Log.info("Populating from queue at %d", currentlyIndexedNodeId);
                }
                // Before applying updates from the updates queue any pending scan updates needs to be applied, i.e. flushed.
                // This is because 'currentlyIndexedNodeId' is based on how far the scan has come.
                FlushAll();

                using (MultipleIndexUpdater updater = NewPopulatingUpdater(_storeView))
                {
                    do
                    {
                        // no need to check for null as nobody else is emptying this queue
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: org.neo4j.kernel.api.index.IndexEntryUpdate<?> update = updatesQueue.poll();
                        IndexEntryUpdate <object> update = UpdatesQueue.RemoveFirst();
                        _storeScan.acceptUpdate(updater, update, currentlyIndexedNodeId);
                        if (PrintDebug)
                        {
                            Log.info("Applied %s from queue" + update);
                        }
                    } while (UpdatesQueue.Count > 0);
                }
                if (PrintDebug)
                {
                    Log.info("Done applying updates from queue");
                }
                return(true);
            }
            return(false);
        }
 public override void AcceptUpdate <T1>(MultipleIndexUpdater updater, IndexEntryUpdate <T1> update, long currentlyIndexedNodeId)
 {
     Delegate.acceptUpdate(updater, update, currentlyIndexedNodeId);
 }