org.hibernate.search.store
Interface IndexShardingStrategy

All Known Implementing Classes:
IdHashShardingStrategy, NotShardedStrategy

public interface IndexShardingStrategy

Defines how a given virtual index shards data into different DirectoryProviders

Author:
Emmanuel Bernard

Method Summary
 DirectoryProvider<?> getDirectoryProviderForAddition(Class<?> entity, Serializable id, 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(Class<?> entity, Serializable id, 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.
 void initialize(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
 

Method Detail

initialize

void initialize(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


getDirectoryProvidersForAllShards

DirectoryProvider<?>[] getDirectoryProvidersForAllShards()
Ask for all shards (eg to query or optimize)


getDirectoryProviderForAddition

DirectoryProvider<?> getDirectoryProviderForAddition(Class<?> entity,
                                                     Serializable id,
                                                     String idInString,
                                                     org.apache.lucene.document.Document document)
return the DirectoryProvider where the given entity will be indexed


getDirectoryProvidersForDeletion

DirectoryProvider<?>[] getDirectoryProvidersForDeletion(Class<?> entity,
                                                        Serializable id,
                                                        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. If null, all the directory providers containing entity types should be returned



Copyright © 2011 Hibernate. All Rights Reserved.