public class IndexAndTaxonomyReplicationHandler extends Object implements ReplicationClient.ReplicationHandler
ReplicationClient.ReplicationHandlerfor replication of an index and taxonomy pair. See
IndexReplicationHandlerfor 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.
|Constructor and Description|
Constructor with the given index directory and callback to notify when the indexes were updated.
|Modifier and Type||Method and Description|
Returns the current revision files held by the handler.
Returns the current revision version held by the handler.
Called when a new revision was obtained and is available (i.e.
public String currentVersion()
public Map<String,List<RevisionFile>> currentRevisionFiles()
public void revisionReady(String version, Map<String,List<RevisionFile>> revisionFiles, Map<String,List<String>> copiedFiles, Map<String,Directory> sourceDirectory) throws IOException
version- the version of the
Revisionthat was copied
revisionFiles- the files contained by this
copiedFiles- the files that were actually copied
sourceDirectory- a mapping from a source of files to the
Directorythey were copied into
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.