org.alfresco.repo.search.impl.lucene
Class AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent

java.lang.Object
  extended by org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent
Enclosing class:
AbstractLuceneIndexerAndSearcherFactory

public static class AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent
extends java.lang.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 AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent.backup() method, but the convenience AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupJob can be used to call it as well.


Constructor Summary
AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent()
          Default constructor
 
Method Summary
 void afterPropertiesSetXXX()
           
 void backup()
          Backup the Lucene indexes
 void setCheckConfiguration(boolean checkConfiguration)
          If false do not check the index configuration.
 void setFactories(java.util.Set factories)
          Set the Lucene index factory that will be used to control the index locks
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
          Used to retrieve the stores
 void setTargetLocation(java.lang.String targetLocation)
          Set the directory to which the backup will be copied
 void setTransactionService(TransactionService transactionService)
          Provides transactions in which to perform the work
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent

public AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent()
Default constructor

Method Detail

setCheckConfiguration

public void setCheckConfiguration(boolean checkConfiguration)
If false do not check the index configuration.

Parameters:
checkConfiguration -

setTransactionService

public void setTransactionService(TransactionService transactionService)
Provides transactions in which to perform the work

Parameters:
transactionService -

setFactories

public void setFactories(java.util.Set 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


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.