lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [lucenenet] jeme commented on issue #401: Lucene Replication - Geting revision from replicator (local) and handler (remote)
Date Wed, 13 Jan 2021 07:22:25 GMT

jeme commented on issue #401:

   1) Sounds about right
   2) Since your passing a IReplicationHandler to the client, where IndexReplicationHandler
is just the built-in implementation, see: CurrentVersion :
   3) Do the batch update and wait with publishing a revision till your done, on server B
the IndexReplicationHandler takes a Func<bool?> as a last parameter in the constructor,
this is called as the last thing in the replication process.
   If you require a tighter integration or perhaps more insight to when a replication starts
and ends on server B, or to expose additional information. You can utilize a decorator pattern
and simply delegate to the IndexReplicationHandler.
   public class MyIndexReplicationHandler : IReplicationHandler
       private readonly IReplicationHandler innerHandler;
       public string CurrentVersion => innerHandler.CurrentVersion;
       public IDictionary<string, IList<RevisionFile>> CurrentRevisionFiles =>
       public MyIndexReplicationHandler(IReplicationHandler innerHandler)
           this.innerHandler = innerHandler;
       public void RevisionReady(string version, IDictionary<string, IList<RevisionFile>>
revisionFiles, IDictionary<string, IList<string>> copiedFiles, IDictionary<string,
Directory> sourceDirectory)
           //TODO: Do something before replication takes place.
           innerHandler.RevisionReady(version, revisionFiles, copiedFiles, sourceDirectory);
           //TODO: Do something after replication takes place.

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.

For queries about this service, please contact Infrastructure at:

View raw message