Package org.apache.lucene.replicator
Class IndexAndTaxonomyReplicationHandler
- java.lang.Object
-
- org.apache.lucene.replicator.IndexAndTaxonomyReplicationHandler
-
- All Implemented Interfaces:
ReplicationClient.ReplicationHandler
@Deprecated public class IndexAndTaxonomyReplicationHandler extends Object implements ReplicationClient.ReplicationHandler
Deprecated.use org.apache.lucene.replicator.nrt insteadAReplicationClient.ReplicationHandlerfor replication of an index and taxonomy pair. SeeIndexReplicationHandlerfor more detail. This handler ensures that the search and taxonomy indexes are replicated in a consistent way.NOTE: if you intend to recreate a taxonomy index, you should make sure to reopen an IndexSearcher and TaxonomyReader pair via the provided callback, to guarantee that both indexes are in sync. This handler does not prevent replicating such index and taxonomy pairs, and if they are reopened by a different thread, unexpected errors can occur, as well as inconsistency between the taxonomy and index readers.
- See Also:
IndexReplicationHandler- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description static StringINFO_STREAM_COMPONENTDeprecated.The component used to log messages to thedefaultInfoStream.
-
Constructor Summary
Constructors Constructor Description IndexAndTaxonomyReplicationHandler(Directory indexDir, Directory taxoDir, Callable<Boolean> callback)Deprecated.Constructor with the given index directory and callback to notify when the indexes were updated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Map<String,List<RevisionFile>>currentRevisionFiles()Deprecated.Returns the current revision files held by the handler.StringcurrentVersion()Deprecated.Returns the current revision version held by the handler.voidrevisionReady(String version, Map<String,List<RevisionFile>> revisionFiles, Map<String,List<String>> copiedFiles, Map<String,Directory> sourceDirectory)Deprecated.Called when a new revision was obtained and is available (i.e.voidsetInfoStream(InfoStream infoStream)Deprecated.Sets theInfoStreamto use for logging messages.
-
-
-
Field Detail
-
INFO_STREAM_COMPONENT
public static final String INFO_STREAM_COMPONENT
Deprecated.The component used to log messages to thedefaultInfoStream.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IndexAndTaxonomyReplicationHandler
public IndexAndTaxonomyReplicationHandler(Directory indexDir, Directory taxoDir, Callable<Boolean> callback) throws IOException
Deprecated.Constructor with the given index directory and callback to notify when the indexes were updated.- Throws:
IOException
-
-
Method Detail
-
currentVersion
public String currentVersion()
Deprecated.Description copied from interface:ReplicationClient.ReplicationHandlerReturns the current revision version held by the handler.- Specified by:
currentVersionin interfaceReplicationClient.ReplicationHandler
-
currentRevisionFiles
public Map<String,List<RevisionFile>> currentRevisionFiles()
Deprecated.Description copied from interface:ReplicationClient.ReplicationHandlerReturns the current revision files held by the handler.- Specified by:
currentRevisionFilesin interfaceReplicationClient.ReplicationHandler
-
revisionReady
public void revisionReady(String version, Map<String,List<RevisionFile>> revisionFiles, Map<String,List<String>> copiedFiles, Map<String,Directory> sourceDirectory) throws IOException
Deprecated.Description copied from interface:ReplicationClient.ReplicationHandlerCalled when a new revision was obtained and is available (i.e. all needed files were successfully copied).- Specified by:
revisionReadyin interfaceReplicationClient.ReplicationHandler- Parameters:
version- the version of theRevisionthat was copiedrevisionFiles- the files contained by thisRevisioncopiedFiles- the files that were actually copiedsourceDirectory- a mapping from a source of files to theDirectorythey were copied into- Throws:
IOException
-
setInfoStream
public void setInfoStream(InfoStream infoStream)
Deprecated.Sets theInfoStreamto use for logging messages.
-
-