com.atlassian.jira.sharing.index
Class DefaultSharedEntityIndexer.DefaultEntityTypeConnectionManager

java.lang.Object
  extended by com.atlassian.jira.sharing.index.DefaultSharedEntityIndexer.DefaultEntityTypeConnectionManager
All Implemented Interfaces:
DefaultSharedEntityIndexer.EntityTypeConnectionManager
Enclosing class:
DefaultSharedEntityIndexer

public static class DefaultSharedEntityIndexer.DefaultEntityTypeConnectionManager
extends Object
implements DefaultSharedEntityIndexer.EntityTypeConnectionManager


Constructor Summary
DefaultSharedEntityIndexer.DefaultEntityTypeConnectionManager(LuceneConnectionFactory connectionFactory, IndexPath indexPath)
           
 
Method Summary
 String clear(SharedEntity.TypeDescriptor key)
          Clear out the index for the specified type and return the path.
 Collection getAllIndexPaths()
           
 org.apache.lucene.search.Searcher getSearcher(SharedEntity.TypeDescriptor type)
          Get an Searcher for the specified type.
 void optimize(SharedEntity.TypeDescriptor type)
          Optimize an index.
 void shutdown(SharedEntity.TypeDescriptor key)
          Shutdown an index connection for the specified type.
 void write(SharedEntity.TypeDescriptor type, com.atlassian.bonnie.ILuceneConnection.WriterAction action)
          Write something to the index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSharedEntityIndexer.DefaultEntityTypeConnectionManager

public DefaultSharedEntityIndexer.DefaultEntityTypeConnectionManager(LuceneConnectionFactory connectionFactory,
                                                                     IndexPath indexPath)
Method Detail

getSearcher

public org.apache.lucene.search.Searcher getSearcher(SharedEntity.TypeDescriptor type)
Description copied from interface: DefaultSharedEntityIndexer.EntityTypeConnectionManager
Get an Searcher for the specified type. Must be closed after use.

Specified by:
getSearcher in interface DefaultSharedEntityIndexer.EntityTypeConnectionManager
Parameters:
type - the SharedEntity type
Returns:
the Searcher - must not be null

optimize

public void optimize(SharedEntity.TypeDescriptor type)
Description copied from interface: DefaultSharedEntityIndexer.EntityTypeConnectionManager
Optimize an index.

Specified by:
optimize in interface DefaultSharedEntityIndexer.EntityTypeConnectionManager
Parameters:
type - the index to optimize.

write

public void write(SharedEntity.TypeDescriptor type,
                  com.atlassian.bonnie.ILuceneConnection.WriterAction action)
Description copied from interface: DefaultSharedEntityIndexer.EntityTypeConnectionManager
Write something to the index.

Specified by:
write in interface DefaultSharedEntityIndexer.EntityTypeConnectionManager
Parameters:
type - the index to write to
action - to perform the write

clear

public String clear(SharedEntity.TypeDescriptor key)
Description copied from interface: DefaultSharedEntityIndexer.EntityTypeConnectionManager
Clear out the index for the specified type and return the path.

Specified by:
clear in interface DefaultSharedEntityIndexer.EntityTypeConnectionManager
Parameters:
key - the SharedEntity type
Returns:
the path where the indexes were

shutdown

public void shutdown(SharedEntity.TypeDescriptor key)
Description copied from interface: DefaultSharedEntityIndexer.EntityTypeConnectionManager
Shutdown an index connection for the specified type.

Specified by:
shutdown in interface DefaultSharedEntityIndexer.EntityTypeConnectionManager
Parameters:
key - the SharedEntity type

getAllIndexPaths

public Collection getAllIndexPaths()
Specified by:
getAllIndexPaths in interface DefaultSharedEntityIndexer.EntityTypeConnectionManager
Returns:
all the index paths


Copyright © 2002-2009 Atlassian. All Rights Reserved.