org.hibernate.search.infinispan.impl
Class InfinispanDirectoryProvider

java.lang.Object
  extended by org.hibernate.search.infinispan.impl.InfinispanDirectoryProvider
All Implemented Interfaces:
DirectoryProvider<org.infinispan.lucene.InfinispanDirectory>

public class InfinispanDirectoryProvider
extends Object
implements DirectoryProvider<org.infinispan.lucene.InfinispanDirectory>

A DirectoryProvider using Infinispan to store the Index. This depends on the CacheManagerServiceProvider to get a reference to the Infinispan EmbeddedCacheManager.

Author:
Sanne Grinovero

Field Summary
static String DEFAULT_INDEXESDATA_CACHENAME
           
static String DEFAULT_INDEXESMETADATA_CACHENAME
           
static String DEFAULT_LOCKING_CACHENAME
           
 
Constructor Summary
InfinispanDirectoryProvider()
           
 
Method Summary
 org.infinispan.manager.EmbeddedCacheManager getCacheManager()
           
 org.infinispan.lucene.InfinispanDirectory getDirectory()
          Returns an initialized Lucene Directory.
 void initialize(String directoryProviderName, Properties properties, BuildContext context)
           
 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LOCKING_CACHENAME

public static final String DEFAULT_LOCKING_CACHENAME
See Also:
Constant Field Values

DEFAULT_INDEXESDATA_CACHENAME

public static final String DEFAULT_INDEXESDATA_CACHENAME
See Also:
Constant Field Values

DEFAULT_INDEXESMETADATA_CACHENAME

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

InfinispanDirectoryProvider

public InfinispanDirectoryProvider()
Method Detail

initialize

public void initialize(String directoryProviderName,
                       Properties properties,
                       BuildContext context)
Specified by:
initialize in interface DirectoryProvider<org.infinispan.lucene.InfinispanDirectory>
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.infinispan.lucene.InfinispanDirectory>

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.infinispan.lucene.InfinispanDirectory>

getDirectory

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

Specified by:
getDirectory in interface DirectoryProvider<org.infinispan.lucene.InfinispanDirectory>

getCacheManager

public org.infinispan.manager.EmbeddedCacheManager getCacheManager()


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