laimis commented on code in PR #809:
URL: https://github.com/apache/lucenenet/pull/809#discussion_r1161192183


##########
src/Lucene.Net/Util/RollingBuffer.cs:
##########
@@ -37,12 +36,35 @@ public interface IResettable
         }
     }
 
+    /// <summary>
+    /// LUCENENET specific interface to allow overriding rolling buffer item 
creation
+    /// without having to call virtual methods from the constructor
+    /// </summary>
+    public interface IRollingBufferItemFactory<out T>
+    {
+        T Create(object rollingBuffer);
+    }
+
+    /// <summary>
+    /// LUCENENET specific class that provides default implementation for
+    /// <see cref="IRollingBufferItemFactory{T}"/>.
+    /// </summary>
+    public class RollingBufferItemFactory<T> : IRollingBufferItemFactory<T> 
where T : new()

Review Comment:
   Question, since we are not forcing new() on the RollingBuffer level, is that 
still an issue? We only force it if someone wants to use the default 
RollingBufferItemFactory. But that factory is not forced upon anyone. What do 
you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to