|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ShardIdentifierProvider
Implementations provide the identifiers of those shards to be taken into account by the engine when working with specified entities or queries.
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.
| Method Summary | |
|---|---|
Set<String> |
getAllShardIdentifiers()
Returns the list of all currently known shard identifiers. |
String |
getShardIdentifier(Class<?> entityType,
Serializable id,
String idAsString,
org.apache.lucene.document.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. |
| Method Detail |
|---|
void initialize(Properties properties,
BuildContext buildContext)
properties - The configuration propertiesbuildContext - The build context available during bootstrapping
String getShardIdentifier(Class<?> entityType,
Serializable id,
String idAsString,
org.apache.lucene.document.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 id
Set<String> getShardIdentifiersForQuery(FullTextFilterImplementor[] fullTextFilters)
getShardIdentifier(Class, Serializable, String, Document), getShardIdentifiersForQuery(FullTextFilterImplementor[]),
getAllShardIdentifiers().
fullTextFilters - the filters which are applied to the current query
Set<String> getAllShardIdentifiers()
getShardIdentifier(Class, Serializable, String, Document), getShardIdentifiersForQuery(FullTextFilterImplementor[]),
getAllShardIdentifiers().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||