Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.search.lucene
Class LuceneConfigurations.RamDirectoryFactory

    java.lang.Object
      org.modeshape.search.lucene.LuceneConfigurations.PoolingDirectoryFactory<org.apache.lucene.store.RAMDirectory>
          org.modeshape.search.lucene.LuceneConfigurations.RamDirectoryFactory

All Implemented Interfaces:
  LuceneConfiguration

Enclosing class:
  LuceneConfigurations

    @ThreadSafe
    public static class LuceneConfigurations.RamDirectoryFactory

extends LuceneConfigurations.PoolingDirectoryFactory<org.apache.lucene.store.RAMDirectory>

A `LuceneConfiguration` implementation that creates `RAMDirectory` instances for each workspace and index name. Each factory instance maintains a pool of `RAMDirectory` instances, ensuring that the same `RAMDirectory` is always returned for the same workspace name.

Constructor Summary
`protected` | `LuceneConfigurations.RamDirectoryFactory()`

Method Summary
`protected org.apache.lucene.store.RAMDirectory` | `createDirectory(String workspaceName, String indexName)` Method implemented by subclasses to create a new Directory implementation.
`protected boolean` | `doDestroy(org.apache.lucene.store.RAMDirectory directory)`
`org.apache.lucene.util.Version` | `getVersion()` Get the version for the Lucene configuration.

Methods inherited from class org.modeshape.search.lucene.LuceneConfigurations.PoolingDirectoryFactory
`destroyDirectory, getDirectory, hasExistingIndex`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LuceneConfigurations.RamDirectoryFactory

    protected LuceneConfigurations.RamDirectoryFactory()

Method Detail

### getVersion

    public org.apache.lucene.util.Version getVersion()

  Get the version for the Lucene configuration.

  Returns:
    the version
  See Also:
    `LuceneConfiguration.getVersion()`

### createDirectory

    protected org.apache.lucene.store.RAMDirectory createDirectory(String workspaceName,
                                                                   String indexName)

  Description copied from class: `LuceneConfigurations.PoolingDirectoryFactory`
  Method implemented by subclasses to create a new Directory implementation.

  Specified by:
    `createDirectory` in class `LuceneConfigurations.PoolingDirectoryFactory<org.apache.lucene.store.RAMDirectory>`
  Parameters:
    `workspaceName` - the name of the workspace for which the `Directory` is to be created; never null
    `indexName` - the name of the index to be created
  Returns:
    the new directory; may not be null

### doDestroy

    protected boolean doDestroy(org.apache.lucene.store.RAMDirectory directory)
                         throws SearchEngineException

  Specified by:
    `doDestroy` in class `LuceneConfigurations.PoolingDirectoryFactory<org.apache.lucene.store.RAMDirectory>`
  Throws:
    `SearchEngineException`
  See Also:
    `LuceneConfigurations.PoolingDirectoryFactory.doDestroy(org.apache.lucene.store.Directory)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.