org.hibernate.search.store
Class NotShardedStrategy

java.lang.Object
  extended by org.hibernate.search.store.NotShardedStrategy
All Implemented Interfaces:
IndexShardingStrategy

public class NotShardedStrategy
extends java.lang.Object
implements IndexShardingStrategy

Author:
Emmanuel Bernard

Constructor Summary
NotShardedStrategy()
           
 
Method Summary
 DirectoryProvider<?> getDirectoryProviderForAddition(java.lang.Class<?> entity, java.io.Serializable id, java.lang.String idInString, org.apache.lucene.document.Document document)
          return the DirectoryProvider where the given entity will be indexed
 DirectoryProvider<?>[] getDirectoryProvidersForAllShards()
          Ask for all shards (eg to query or optimize)
 DirectoryProvider<?>[] getDirectoryProvidersForDeletion(java.lang.Class<?> entity, java.io.Serializable id, java.lang.String idInString)
          return the DirectoryProvider(s) where the given entity is stored and where the deletion operation needs to be applied id and idInString can be null.
 DirectoryProvider<?>[] getDirectoryProvidersForQuery(FullTextFilterImplementor[] fullTextFilters)
          return the set of DirectoryProvider(s) where the entities matching the filters are stored this optional optimization allows queries to hit a subset of all shards, which may be useful for some datasets if this optimization is not needed, return getDirectoryProvidersForAllShards() fullTextFilters can be empty if no filter is applied
 void initialize(java.util.Properties properties, DirectoryProvider<?>[] providers)
          provides access to sharding properties (under the suffix sharding_strategy) and provide access to all the DirectoryProviders for a given index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotShardedStrategy

public NotShardedStrategy()
Method Detail

initialize

public void initialize(java.util.Properties properties,
                       DirectoryProvider<?>[] providers)
Description copied from interface: IndexShardingStrategy
provides access to sharding properties (under the suffix sharding_strategy) and provide access to all the DirectoryProviders for a given index

Specified by:
initialize in interface IndexShardingStrategy

getDirectoryProvidersForAllShards

public DirectoryProvider<?>[] getDirectoryProvidersForAllShards()
Description copied from interface: IndexShardingStrategy
Ask for all shards (eg to query or optimize)

Specified by:
getDirectoryProvidersForAllShards in interface IndexShardingStrategy

getDirectoryProviderForAddition

public DirectoryProvider<?> getDirectoryProviderForAddition(java.lang.Class<?> entity,
                                                            java.io.Serializable id,
                                                            java.lang.String idInString,
                                                            org.apache.lucene.document.Document document)
Description copied from interface: IndexShardingStrategy
return the DirectoryProvider where the given entity will be indexed

Specified by:
getDirectoryProviderForAddition in interface IndexShardingStrategy

getDirectoryProvidersForDeletion

public DirectoryProvider<?>[] getDirectoryProvidersForDeletion(java.lang.Class<?> entity,
                                                               java.io.Serializable id,
                                                               java.lang.String idInString)
Description copied from interface: IndexShardingStrategy
return the DirectoryProvider(s) where the given entity is stored and where the deletion operation needs to be applied id and idInString can be null. If null, all the directory providers containing entity types should be returned

Specified by:
getDirectoryProvidersForDeletion in interface IndexShardingStrategy

getDirectoryProvidersForQuery

public DirectoryProvider<?>[] getDirectoryProvidersForQuery(FullTextFilterImplementor[] fullTextFilters)
Description copied from interface: IndexShardingStrategy
return the set of DirectoryProvider(s) where the entities matching the filters are stored this optional optimization allows queries to hit a subset of all shards, which may be useful for some datasets if this optimization is not needed, return getDirectoryProvidersForAllShards() fullTextFilters can be empty if no filter is applied

Specified by:
getDirectoryProvidersForQuery in interface IndexShardingStrategy


Copyright © 2006-2010 Hibernate. All Rights Reserved.