org.hibernate.search.store
public interface ShardIdentifierProvider
Implementation notes:
With exception of the initialize(Properties, BuildContext) method which is invoked
only once at startup, all other methods could be invoked in parallel by independent threads; implementations must
thus be thread-safe.
Instead of implementing this interface directly, implementations should be derived from
ShardIdentifierProviderTemplate as new methods might be added to this interface in future releases.
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getAllShardIdentifiers()
Returns the list of all currently known shard identifiers.
|
String |
getShardIdentifier(Class<?> entityType,
Serializable id,
String idAsString,
Document document)
Determine the shard identifier for the given entity.
|
Set<String> |
getShardIdentifiersForQuery(FullTextFilterImplementor[] fullTextFilters)
Returns the set of shard identifiers for a query given the applied filters.
|
void |
initialize(Properties properties,
BuildContext buildContext)
Initialize this provider.
|
void initialize(Properties properties, BuildContext buildContext)
properties - The configuration propertiesbuildContext - The build context available during bootstrappingString getShardIdentifier(Class<?> entityType, Serializable id, String idAsString, Document document)
getShardIdentifier(Class, Serializable, String, Document), getShardIdentifiersForQuery(FullTextFilterImplementor[]),
getAllShardIdentifiers().entityType - the type of the entityid - the id of the entityidAsString - the entity id transformed as string via the appropriate document id bridgedocument - the Lucene document for the entity with the given idSet<String> getShardIdentifiersForQuery(FullTextFilterImplementor[] fullTextFilters)
getShardIdentifier(Class, Serializable, String, Document), getShardIdentifiersForQuery(FullTextFilterImplementor[]),
getAllShardIdentifiers().fullTextFilters - the filters which are applied to the current querySet<String> getAllShardIdentifiers()
getShardIdentifier(Class, Serializable, String, Document), getShardIdentifiersForQuery(FullTextFilterImplementor[]),
getAllShardIdentifiers().Copyright © 2006-2015 Red Hat, Inc. All Rights Reserved