Table of Contents

Class LoggingReplicationClient

Namespace
Examine.Lucene
Assembly
Examine.Lucene.dll

Custom replication client that logs

public class LoggingReplicationClient : ReplicationClient, IDisposable
Inheritance
ReplicationClient
LoggingReplicationClient
Implements
Inherited Members
ReplicationClient.INFO_STREAM_COMPONENT
ReplicationClient.EnsureOpen()
ReplicationClient.Dispose()
ReplicationClient.StopUpdateThread()
ReplicationClient.ToString()
ReplicationClient.UpdateNow()
ReplicationClient.IsUpdateThreadAlive
ReplicationClient.InfoStream

Constructors

LoggingReplicationClient(ILogger<LoggingReplicationClient>, IReplicator, IReplicationHandler, ISourceDirectoryFactory)

public LoggingReplicationClient(ILogger<LoggingReplicationClient> logger, IReplicator replicator, IReplicationHandler handler, ISourceDirectoryFactory factory)

Parameters

logger ILogger<LoggingReplicationClient>
replicator IReplicator
handler IReplicationHandler
factory ISourceDirectoryFactory

Methods

HandleUpdateException(Exception)

Called when an exception is hit by the replication thread. The default implementation prints the full stacktrace to the Lucene.Net.Util.InfoStream set in Lucene.Net.Replicator.ReplicationClient.InfoStream, or the Lucene.Net.Util.InfoStream.Default one. You can override to log the exception elsewhere.

protected override void HandleUpdateException(Exception exception)

Parameters

exception Exception

Remarks

NOTE: If you override this method to throw the exception further, the replication thread will be terminated. The only way to restart it is to call Lucene.Net.Replicator.ReplicationClient.StopUpdateThread() followed by StartUpdateThread(long, string).