Package org.alfresco.repo.index.shard
Interface ShardRegistry
-
public interface ShardRegistryA registry which collects all the active shard subscriptions.- Author:
- Andy, agazzarini, eporciani
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description QNamegetExplicitIdProperty(String coreName)Returns the property used for EXPLICIT_ID Sharding methods if exists.Map<Floc,Map<Shard,Set<ShardState>>>getFlocs()List<ShardInstance>getIndexSlice(SearchParameters searchParameters)OptionalIntgetShardInstanceByTransactionTimestamp(String coreId, long txnTimestamp)Returns the shard instance (i.e.Set<Integer>getShardInstanceList(String coreName)Returns the list with the numbers of the registered Shard Instances.voidpurge()voidpurgeAgedOutShards()voidregisterShardState(ShardState shardState)Registers (or updates the existing subscription) of a shard.
-
-
-
Method Detail
-
registerShardState
void registerShardState(ShardState shardState)
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
List<ShardInstance> getIndexSlice(SearchParameters searchParameters)
-
purge
void purge()
-
purgeAgedOutShards
void purgeAgedOutShards()
-
getShardInstanceByTransactionTimestamp
OptionalInt 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.- 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
QName getExplicitIdProperty(String coreName)
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.
-
-