public IteratorAnonymousInnerClassHelper(DocumentsWriterFlushControl outerInstance, int upto) { this.outerInstance = outerInstance; this.upto = upto; i = 0; }
/// <summary> /// Called for each document update on the given <see cref="ThreadState"/>'s /// <see cref="DocumentsWriterPerThread"/>. /// <para/> /// Note: this method is called synchronized on the given /// <see cref="DocumentsWriterFlushControl"/> and it is guaranteed that the calling /// thread holds the lock on the given <see cref="ThreadState"/> /// </summary> public virtual void OnUpdate(DocumentsWriterFlushControl control, ThreadState state) { OnInsert(control, state); OnDelete(control, state); }
/// <summary> /// Called for each document addition on the given <see cref="ThreadState"/>s /// <see cref="DocumentsWriterPerThread"/>. /// <para/> /// Note: this method is synchronized by the given /// <see cref="DocumentsWriterFlushControl"/> and it is guaranteed that the calling /// thread holds the lock on the given <see cref="ThreadState"/> /// </summary> public abstract void OnInsert(DocumentsWriterFlushControl control, ThreadState state);
/// <summary> /// Marks the most ram consuming active <see cref="DocumentsWriterPerThread"/> flush /// pending /// </summary> protected virtual void MarkLargestWriterPending(DocumentsWriterFlushControl control, ThreadState perThreadState, long currentBytesPerThread) { control.SetFlushPending(FindLargestNonPendingWriter(control, perThreadState)); }