public abstract class ShardIdentifierProviderTemplate extends Object implements ShardIdentifierProvider
ShardIdentifierProvider implementations. Sub-classes must provide a
no-arg constructor.| Constructor and Description |
|---|
ShardIdentifierProviderTemplate() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addShard(String shardName) |
Set<String> |
getAllShardIdentifiers()
Returns the list of all currently known shard identifiers.
|
Set<String> |
getShardIdentifiersForDeletion(Class<?> entity,
Serializable id,
String idInString)
Override this method if the mapping to a specific shard can be inferred just from the pair (id, type).
|
Set<String> |
getShardIdentifiersForQuery(FullTextFilterImplementor[] fullTextFilters)
Potentially suited to be overridden if you are able to narrow down the shard
selection based on the active FullTextFilters.
|
void |
initialize(Properties properties,
BuildContext buildContext)
Initialize this provider.
|
protected abstract Set<String> |
loadInitialShardNames(Properties properties,
BuildContext buildContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetShardIdentifierpublic final void initialize(Properties properties, BuildContext buildContext)
ShardIdentifierProviderinitialize in interface ShardIdentifierProviderproperties - The configuration propertiesbuildContext - The build context available during bootstrappingprotected abstract Set<String> loadInitialShardNames(Properties properties, BuildContext buildContext)
protected final void addShard(String shardName)
public final Set<String> getAllShardIdentifiers()
ShardIdentifierProviderShardIdentifierProvider.getShardIdentifier(Class, Serializable, String, Document), ShardIdentifierProvider.getShardIdentifiersForQuery(FullTextFilterImplementor[]),
ShardIdentifierProvider.getAllShardIdentifiers().getAllShardIdentifiers in interface ShardIdentifierProviderpublic Set<String> getShardIdentifiersForQuery(FullTextFilterImplementor[] fullTextFilters)
getShardIdentifiersForQuery in interface ShardIdentifierProviderfullTextFilters - the filters which are applied to the current querypublic Set<String> getShardIdentifiersForDeletion(Class<?> entity, Serializable id, String idInString)
getShardIdentifiersForDeletion in interface ShardIdentifierProviderentity - the type of the deleted entityid - the id or nullidInString - the transformed id or nullCopyright © 2006-2021 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.