org.alfresco.repo.search.impl.lucene.fts
Class FullTextSearchIndexerImpl

java.lang.Object
  extended by org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexerImpl
All Implemented Interfaces:
FTSIndexerAware, FullTextSearchIndexer, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean

public class FullTextSearchIndexerImpl
extends java.lang.Object
implements FTSIndexerAware, FullTextSearchIndexer, org.springframework.beans.factory.DisposableBean

Background index update scheduler


Constructor Summary
FullTextSearchIndexerImpl()
           
 
Method Summary
 void destroy()
           
 void index()
          Do a chunk of outstanding indexing work
 void indexCompleted(org.alfresco.service.cmr.repository.StoreRef storeRef, int remaining, java.lang.Exception e)
          Call back used by the background indexer
static void main(java.lang.String[] args)
           
 void pause()
          Pause indexing 9no back ground indexing until a resume is called)
 void requiresIndex(org.alfresco.service.cmr.repository.StoreRef storeRef)
          Mark a store as dirty, requiring a background index update to fix it up.
 void resume()
          Resume after a pause
 void setBatchSize(int batchSzie)
          The maximum maximum batch size
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
           
 void setIndexerAndSearcherFactory(IndexerAndSearcher indexerAndSearcherFactory)
           
 void setTransactionService(TransactionService transactionService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FullTextSearchIndexerImpl

public FullTextSearchIndexerImpl()
Method Detail

requiresIndex

public void requiresIndex(org.alfresco.service.cmr.repository.StoreRef storeRef)
Description copied from interface: FullTextSearchIndexer
Mark a store as dirty, requiring a background index update to fix it up.

Specified by:
requiresIndex in interface FullTextSearchIndexer

indexCompleted

public void indexCompleted(org.alfresco.service.cmr.repository.StoreRef storeRef,
                           int remaining,
                           java.lang.Exception e)
Description copied from interface: FTSIndexerAware
Call back used by the background indexer

Specified by:
indexCompleted in interface FTSIndexerAware
Specified by:
indexCompleted in interface FullTextSearchIndexer

pause

public void pause()
           throws java.lang.InterruptedException
Description copied from interface: FullTextSearchIndexer
Pause indexing 9no back ground indexing until a resume is called)

Specified by:
pause in interface FullTextSearchIndexer
Throws:
java.lang.InterruptedException

resume

public void resume()
            throws java.lang.InterruptedException
Description copied from interface: FullTextSearchIndexer
Resume after a pause

Specified by:
resume in interface FullTextSearchIndexer
Throws:
java.lang.InterruptedException

index

public void index()
Description copied from interface: FullTextSearchIndexer
Do a chunk of outstanding indexing work

Specified by:
index in interface FullTextSearchIndexer

setIndexerAndSearcherFactory

public void setIndexerAndSearcherFactory(IndexerAndSearcher indexerAndSearcherFactory)
Parameters:
indexerAndSearcherFactory -

setTransactionService

public void setTransactionService(TransactionService transactionService)
Parameters:
transactionService -

main

public static void main(java.lang.String[] args)
                 throws java.lang.InterruptedException
Parameters:
args -
Throws:
java.lang.InterruptedException

setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
                    throws org.springframework.beans.BeansException
Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
Throws:
org.springframework.beans.BeansException

setBatchSize

public void setBatchSize(int batchSzie)
The maximum maximum batch size

Parameters:
batchSize - the batchSize to set

destroy

public void destroy()
             throws java.lang.Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
java.lang.Exception


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