Lucene.Net.Index.ConcurrentMergeScheduler.Verbose C# (CSharp) Метод

Verbose() приватный Метод

private Verbose ( ) : bool
Результат bool
		private bool Verbose()
		{
			return writer != null && writer.Verbose;
		}
		

Usage Example

            public override void Run()
            {
                // First time through the while loop we do the merge
                // that we were started with:
                MergePolicy.OneMerge merge = this.StartMerge;

                try
                {
                    if (OuterInstance.Verbose())
                    {
                        OuterInstance.Message("  merge thread: start");
                    }

                    while (true)
                    {
                        RunningMerge = merge;
                        OuterInstance.DoMerge(merge);

                        // Subsequent times through the loop we do any new
                        // merge that writer says is necessary:
                        merge = TWriter.NextMerge;

                        // Notify here in case any threads were stalled;
                        // they will notice that the pending merge has
                        // been pulled and possibly resume:
                        lock (OuterInstance)
                        {
                            Monitor.PulseAll(OuterInstance);
                        }

                        if (merge != null)
                        {
                            OuterInstance.UpdateMergeThreads();
                            if (OuterInstance.Verbose())
                            {
                                OuterInstance.Message("  merge thread: do another merge " + TWriter.SegString(merge.Segments));
                            }
                        }
                        else
                        {
                            break;
                        }
                    }

                    if (OuterInstance.Verbose())
                    {
                        OuterInstance.Message("  merge thread: done");
                    }
                }
                catch (Exception exc)
                {
                    // Ignore the exception if it was due to abort:
                    if (!(exc is MergePolicy.MergeAbortedException))
                    {
                        //System.out.println(Thread.currentThread().getName() + ": CMS: exc");
                        //exc.printStackTrace(System.out);
                        if (!OuterInstance.SuppressExceptions)
                        {
                            // suppressExceptions is normally only set during
                            // testing.
                            OuterInstance.HandleMergeException(exc);
                        }
                    }
                }
                finally
                {
                    Done = true;
                    lock (OuterInstance)
                    {
                        OuterInstance.UpdateMergeThreads();
                        Monitor.PulseAll(OuterInstance);
                    }
                }
            }