org.hibernate.search.store.impl
Class RAMDirectoryProvider

java.lang.Object
  extended by org.hibernate.search.store.impl.RAMDirectoryProvider
All Implemented Interfaces:
DirectoryProvider<org.apache.lucene.store.RAMDirectory>

public class RAMDirectoryProvider
extends Object
implements DirectoryProvider<org.apache.lucene.store.RAMDirectory>

Use a Lucene RAMDirectory

Author:
Emmanuel Bernard, Sylvain Vieujot

Constructor Summary
RAMDirectoryProvider()
           
 
Method Summary
 boolean equals(Object obj)
           
 org.apache.lucene.store.RAMDirectory getDirectory()
          Returns an initialized Lucene Directory.
 int hashCode()
           
 void initialize(String directoryProviderName, Properties properties, BuildContext context)
           
protected  org.apache.lucene.store.RAMDirectory makeRAMDirectory()
          To allow extensions to create different RAMDirectory flavours:
 void start(DirectoryBasedIndexManager indexManager)
          Executed after initialize, this method set up the heavy process of starting up the DirectoryProvider IO processing as well as background processing are expected to be set up here
 void stop()
          Executed when the search factory is closed.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RAMDirectoryProvider

public RAMDirectoryProvider()
Method Detail

initialize

public void initialize(String directoryProviderName,
                       Properties properties,
                       BuildContext context)
Specified by:
initialize in interface DirectoryProvider<org.apache.lucene.store.RAMDirectory>
context - get the information to initialize the directory and build its hashCode/equals method

start

public void start(DirectoryBasedIndexManager indexManager)
Description copied from interface: DirectoryProvider
Executed after initialize, this method set up the heavy process of starting up the DirectoryProvider IO processing as well as background processing are expected to be set up here

Specified by:
start in interface DirectoryProvider<org.apache.lucene.store.RAMDirectory>

getDirectory

public org.apache.lucene.store.RAMDirectory getDirectory()
Description copied from interface: DirectoryProvider
Returns an initialized Lucene Directory. This method call must be threadsafe

Specified by:
getDirectory in interface DirectoryProvider<org.apache.lucene.store.RAMDirectory>

stop

public void stop()
Description copied from interface: DirectoryProvider
Executed when the search factory is closed. This method should stop any background process as well as releasing any resource. This method should avoid raising exceptions and log potential errors instead

Specified by:
stop in interface DirectoryProvider<org.apache.lucene.store.RAMDirectory>

makeRAMDirectory

protected org.apache.lucene.store.RAMDirectory makeRAMDirectory()
To allow extensions to create different RAMDirectory flavours:

Returns:
the RAMDirectory this provider is going to manage

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved