org.compass.core.lucene.engine.store
Class JdbcDirectoryStore

java.lang.Object
  extended by org.compass.core.lucene.engine.store.AbstractDirectoryStore
      extended by org.compass.core.lucene.engine.store.JdbcDirectoryStore
All Implemented Interfaces:
CompassConfigurable, DirectoryStore

public class JdbcDirectoryStore
extends AbstractDirectoryStore
implements CompassConfigurable

Author:
kimchy

Field Summary
static String PROTOCOL
           
 
Constructor Summary
JdbcDirectoryStore()
           
 
Method Summary
 CopyFromHolder beforeCopyFrom(String subContext, String subIndex, Directory dir)
           
 void cleanIndex(Directory dir, String subContext, String subIndex)
          If applicable, cleans the given directory.
 void close()
          Closes the given directory.
 void configure(CompassSettings settings)
          Configure using the given settings.
 void deleteIndex(Directory dir, String subContext, String subIndex)
          If applicable, deletes the given directory.
 Boolean indexExists(Directory dir)
          Returns true if the inex exists, false if it does not.
 Directory open(String subContext, String subIndex)
          Opens a new Directory for the given sub context and sub index.
 void performScheduledTasks(Directory dir, String subContext, String subIndex)
          Perform any scheduled tasks that are needed on the given directory.
 void registerEventListeners(SearchEngine searchEngine, SearchEngineEventManager eventManager)
           
 boolean requiresAsyncTransactionalContext()
          The Jdbc store does require transactional context when executing async operations.
 boolean supportsConcurrentCommits()
          Jdbc store should not support concurrent operations on the index within a single session.
 boolean supportsConcurrentOperations()
          Jdbc store should not support concurrent operations on the index within a single session.
 
Methods inherited from class org.compass.core.lucene.engine.store.AbstractDirectoryStore
afterFailedCopyFrom, afterSuccessfulCopyFrom, closeDirectory, listSubIndexes, suggestedIndexDeletionPolicy, suggestedUseCompoundFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTOCOL

public static final String PROTOCOL
See Also:
Constant Field Values
Constructor Detail

JdbcDirectoryStore

public JdbcDirectoryStore()
Method Detail

supportsConcurrentOperations

public boolean supportsConcurrentOperations()
Jdbc store should not support concurrent operations on the index within a single session.

Specified by:
supportsConcurrentOperations in interface DirectoryStore
Overrides:
supportsConcurrentOperations in class AbstractDirectoryStore

supportsConcurrentCommits

public boolean supportsConcurrentCommits()
Jdbc store should not support concurrent operations on the index within a single session.

Specified by:
supportsConcurrentCommits in interface DirectoryStore
Overrides:
supportsConcurrentCommits in class AbstractDirectoryStore

configure

public void configure(CompassSettings settings)
               throws CompassException
Description copied from interface: CompassConfigurable
Configure using the given settings.

Specified by:
configure in interface CompassConfigurable
Parameters:
settings - The settings for the configured object
Throws:
CompassException

open

public Directory open(String subContext,
                      String subIndex)
               throws SearchEngineException
Description copied from interface: DirectoryStore
Opens a new Directory for the given sub context and sub index.

Specified by:
open in interface DirectoryStore
Throws:
SearchEngineException

indexExists

public Boolean indexExists(Directory dir)
                    throws SearchEngineException
Description copied from interface: DirectoryStore
Returns true if the inex exists, false if it does not. Can return null which then will cause the default checking to apply.

Specified by:
indexExists in interface DirectoryStore
Overrides:
indexExists in class AbstractDirectoryStore
Throws:
SearchEngineException

deleteIndex

public void deleteIndex(Directory dir,
                        String subContext,
                        String subIndex)
                 throws SearchEngineException
Description copied from interface: DirectoryStore
If applicable, deletes the given directory.

Specified by:
deleteIndex in interface DirectoryStore
Overrides:
deleteIndex in class AbstractDirectoryStore
Throws:
SearchEngineException

cleanIndex

public void cleanIndex(Directory dir,
                       String subContext,
                       String subIndex)
                throws SearchEngineException
Description copied from interface: DirectoryStore
If applicable, cleans the given directory. Notes, this will be called right before the directory will be closed. And then a create index will be done.

Specified by:
cleanIndex in interface DirectoryStore
Overrides:
cleanIndex in class AbstractDirectoryStore
Throws:
SearchEngineException

performScheduledTasks

public void performScheduledTasks(Directory dir,
                                  String subContext,
                                  String subIndex)
                           throws SearchEngineException
Description copied from interface: DirectoryStore
Perform any scheduled tasks that are needed on the given directory.

Specified by:
performScheduledTasks in interface DirectoryStore
Overrides:
performScheduledTasks in class AbstractDirectoryStore
Throws:
SearchEngineException

beforeCopyFrom

public CopyFromHolder beforeCopyFrom(String subContext,
                                     String subIndex,
                                     Directory dir)
                              throws SearchEngineException
Specified by:
beforeCopyFrom in interface DirectoryStore
Overrides:
beforeCopyFrom in class AbstractDirectoryStore
Throws:
SearchEngineException

registerEventListeners

public void registerEventListeners(SearchEngine searchEngine,
                                   SearchEngineEventManager eventManager)
Specified by:
registerEventListeners in interface DirectoryStore
Overrides:
registerEventListeners in class AbstractDirectoryStore

close

public void close()
Description copied from interface: DirectoryStore
Closes the given directory.

Specified by:
close in interface DirectoryStore
Overrides:
close in class AbstractDirectoryStore

requiresAsyncTransactionalContext

public boolean requiresAsyncTransactionalContext()
The Jdbc store does require transactional context when executing async operations.

Specified by:
requiresAsyncTransactionalContext in interface DirectoryStore
Overrides:
requiresAsyncTransactionalContext in class AbstractDirectoryStore


Copyright (c) 2004-2009 The Compass Project.