org.compass.needle.coherence
Class AbstractCoherenceDirectoryStore

java.lang.Object
  extended by org.compass.core.lucene.engine.store.AbstractDirectoryStore
      extended by org.compass.needle.coherence.AbstractCoherenceDirectoryStore
All Implemented Interfaces:
CompassConfigurable, DirectoryStore
Direct Known Subclasses:
DataGridCoherenceDirectoryStore, InvocableCoherenceDirectoryStore

public abstract class AbstractCoherenceDirectoryStore
extends AbstractDirectoryStore
implements CompassConfigurable

Author:
kimchy

Field Summary
static String BUCKET_SIZE_PROP
           
static String FLUSH_RATE_PROP
           
 
Fields inherited from class org.compass.core.lucene.engine.store.AbstractDirectoryStore
log
 
Constructor Summary
AbstractCoherenceDirectoryStore()
           
 
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.
protected abstract  String findConnection(String connection)
           
protected  int getBucketSize()
           
protected  com.tangosol.net.NamedCache getCache()
           
protected  int getFlushRate()
           
protected  String getIndexName()
           
 String suggestedIndexDeletionPolicy()
          By default, return null which means let globabl settings to decide what the default index deletion policy should be.
 
Methods inherited from class org.compass.core.lucene.engine.store.AbstractDirectoryStore
afterFailedCopyFrom, afterSuccessfulCopyFrom, closeDirectory, indexExists, performScheduledTasks, registerEventListeners, requiresAsyncTransactionalContext, suggestedUseCompoundFile, supportsConcurrentOperations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.compass.core.lucene.engine.store.DirectoryStore
open
 

Field Detail

BUCKET_SIZE_PROP

public static final String BUCKET_SIZE_PROP
See Also:
Constant Field Values

FLUSH_RATE_PROP

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

AbstractCoherenceDirectoryStore

public AbstractCoherenceDirectoryStore()
Method Detail

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

findConnection

protected abstract String findConnection(String connection)

getIndexName

protected String getIndexName()

getCache

protected com.tangosol.net.NamedCache getCache()

getBucketSize

protected int getBucketSize()

getFlushRate

protected int getFlushRate()

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

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

close

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

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

suggestedIndexDeletionPolicy

public String suggestedIndexDeletionPolicy()
Description copied from class: AbstractDirectoryStore
By default, return null which means let globabl settings to decide what the default index deletion policy should be.

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


Copyright (c) 2004-2008 The Compass Project.