Package org.alfresco.repo.index.shard
Interface ShardRegistry
public interface ShardRegistry
A registry which collects all the active shard subscriptions.
- Author:
- Andy, agazzarini, eporciani
-
Method Summary
Modifier and TypeMethodDescriptiongetExplicitIdProperty(String coreName) Returns the property used for EXPLICIT_ID Sharding methods if exists.getFlocs()getIndexSlice(SearchParameters searchParameters) getShardInstanceByTransactionTimestamp(String coreId, long txnTimestamp) Returns the shard instance (i.e. shard number) which owns (or should own) the transaction associated with the given timestamp.getShardInstanceList(String coreName) Returns the list with the numbers of the registered Shard Instances.voidpurge()voidvoidregisterShardState(ShardState shardState) Registers (or updates the existing subscription) of a shard.
-
Method Details
-
registerShardState
Registers (or updates the existing subscription) of a shard.- Parameters:
shardState- the shard state, which contains the information about the shard that wants to subscribe/register.
-
getIndexSlice
-
purge
void purge() -
getFlocs
-
purgeAgedOutShards
void purgeAgedOutShards() -
getShardInstanceByTransactionTimestamp
Returns the shard instance (i.e. shard number) which owns (or should own) the transaction associated with the given timestamp.- Parameters:
coreId- an identifier (e.g. core name, base url) of the core / collection whose requested shard belongs to.txnTimestamp- the transaction timestamp used as search criteria.- Returns:
- the shard instance (i.e. shard number) which owns (or should own) the transaction associated with the given timestamp.
-
getExplicitIdProperty
Returns the property used for EXPLICIT_ID Sharding methods if exists. Null otherwise.- Parameters:
coreName- is the name of the SOLR core: alfresco, archive- Returns:
- QName of the property used for EXPLICIT_ID Sharding methods or null.
-
getShardInstanceList
Returns the list with the numbers of the registered Shard Instances.- Parameters:
coreName- is the name of the SOLR core: alfresco, archive- Returns:
- Ordered list of numbers of the registered Shard Instances
-