Class AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent
- java.lang.Object
-
- org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent
-
- Enclosing class:
- AbstractLuceneIndexerAndSearcherFactory
public static class AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent extends Object
This component is able to safely perform backups of the Lucene indexes while the server is running.It can be run directly by calling the
backup()method, but the convenienceAbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupJobcan be used to call it as well.- Author:
- Derek Hulley
-
-
Constructor Summary
Constructors Constructor Description LuceneIndexBackupComponent()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSetXXX()voidbackup()Backup the Lucene indexesvoidsetCheckConfiguration(boolean checkConfiguration)If false do not check the index configuration.voidsetFactories(Set<LuceneIndexerAndSearcher> factories)Set the Lucene index factory that will be used to control the index locksvoidsetNodeService(NodeService nodeService)Used to retrieve the storesvoidsetTargetLocation(String targetLocation)Set the directory to which the backup will be copiedvoidsetTransactionService(TransactionService transactionService)Provides transactions in which to perform the work
-
-
-
Method Detail
-
setCheckConfiguration
public void setCheckConfiguration(boolean checkConfiguration)
If false do not check the index configuration.- Parameters:
checkConfiguration- boolean
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
Provides transactions in which to perform the work- Parameters:
transactionService- TransactionService
-
setFactories
public void setFactories(Set<LuceneIndexerAndSearcher> factories)
Set the Lucene index factory that will be used to control the index locks- Parameters:
factories- the index factories
-
setNodeService
public void setNodeService(NodeService nodeService)
Used to retrieve the stores- Parameters:
nodeService- the node service
-
setTargetLocation
public void setTargetLocation(String targetLocation)
Set the directory to which the backup will be copied- Parameters:
targetLocation- the backup directory
-
backup
public void backup()
Backup the Lucene indexes
-
-