Interface ShardRegistry


  • public interface ShardRegistry
    A registry which collects all the active shard subscriptions.
    Author:
    Andy, agazzarini, eporciani
    • 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.
      • 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.
      • getShardInstanceList

        Set<Integer> getShardInstanceList​(String coreName)
        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