Save This Page
Home » hibernate-search-src-20081106 » org.hibernate » search » store » [javadoc | source]
org.hibernate.search.store
public interface: IndexShardingStrategy [javadoc | source]

All Known Implementing Classes:
    NotShardedStrategy, IdHashShardingStrategy

Defines how a given virtual index shards data into different DirectoryProviders
Method from org.hibernate.search.store.IndexShardingStrategy Summary:
getDirectoryProviderForAddition,   getDirectoryProvidersForAllShards,   getDirectoryProvidersForDeletion,   initialize
Method from org.hibernate.search.store.IndexShardingStrategy Detail:
 public DirectoryProvider getDirectoryProviderForAddition(Class entity,
    Serializable id,
    String idInString,
    Document document)
    return the DirectoryProvider where the given entity will be indexed
 public DirectoryProvider[] getDirectoryProvidersForAllShards()
    Ask for all shards (eg to query or optimize)
 public 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
 public  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