You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "paulirwin (via GitHub)" <gi...@apache.org> on 2026/04/11 02:29:19 UTC
Re: [PR] Add client-side async API for replication (IAsyncReplicator, ReplicationClient) [lucenenet]
paulirwin commented on code in PR #1182:
URL: https://github.com/apache/lucenenet/pull/1182#discussion_r3067433969
##########
src/Lucene.Net.Replicator/ReplicationClient.cs:
##########
@@ -151,6 +155,20 @@ public ReplicationClient(IReplicator replicator, IReplicationHandler handler, IS
this.factory = factory;
}
+ /// <summary>
+ /// Constructor for async replicators.
+ /// </summary>
+ /// <param name="asyncReplicator"></param>
+ /// <param name="handler"></param>
+ /// <param name="factory"></param>
+ /// <exception cref="ArgumentNullException"></exception>
+ public ReplicationClient(IAsyncReplicator asyncReplicator, IReplicationHandler handler, ISourceDirectoryFactory factory)
Review Comment:
@Shazwazza Picking this back up again... I ended up going with your suggestion of having IAsyncReplicator inherit from IReplicator, and do a type check. I really like this approach. It also lets us easily wrap the sync methods in Task-based code if you pass in a non-IAsyncReplicator instance, while still letting those methods operate without throwing (they just wouldn't actually be asynchronous). Let me know your thoughts on my latest commit: https://github.com/apache/lucenenet/pull/1182/commits/a6972913fe87325a4fd9486936f3852ccde0f441
--
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-unsubscribe@lucenenet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org