Class AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent
- java.lang.Object
-
- org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent
-
- Enclosing class:
- AbstractLuceneIndexerAndSearcherFactory
public static class AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent extends java.lang.ObjectThis 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(java.util.Set<LuceneIndexerAndSearcher> factories)Set the Lucene index factory that will be used to control the index locksvoidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)Used to retrieve the storesvoidsetTargetLocation(java.lang.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(java.util.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(org.alfresco.service.cmr.repository.NodeService nodeService)
Used to retrieve the stores- Parameters:
nodeService- the node service
-
setTargetLocation
public void setTargetLocation(java.lang.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
-
afterPropertiesSetXXX
public void afterPropertiesSetXXX() throws java.lang.Exception- Throws:
java.lang.Exception
-
-