From fc813f8d70f1d1a36503c035263fec1b6c68d60b Mon Sep 17 00:00:00 2001 From: Angel Borroy <48685308+aborroy@users.noreply.github.com> Date: Wed, 31 Jul 2019 16:41:01 +0200 Subject: [PATCH] Additional methods for EXPLICIT ID validations. (#539) --- .../repo/index/shard/ShardRegistry.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/alfresco/repo/index/shard/ShardRegistry.java b/src/main/java/org/alfresco/repo/index/shard/ShardRegistry.java index 6e8295e795..a136b4e1c5 100644 --- a/src/main/java/org/alfresco/repo/index/shard/ShardRegistry.java +++ b/src/main/java/org/alfresco/repo/index/shard/ShardRegistry.java @@ -27,11 +27,11 @@ package org.alfresco.repo.index.shard; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.OptionalInt; import java.util.Set; import org.alfresco.service.cmr.search.SearchParameters; +import org.alfresco.service.namespace.QName; /** * A registry which collects all the active shard subscriptions. @@ -65,4 +65,21 @@ public interface ShardRegistry * @return the shard instance (i.e. shard number) which owns (or should own) the transaction associated with the given timestamp. */ OptionalInt getShardInstanceByTransactionTimestamp(String coreId, long txnTimestamp); + + /** + * Returns the property used for EXPLICIT_ID Sharding methods if exists. Null otherwise. + * + * @param coreName is the name of the SOLR core: alfresco, archive + * @return QName of the property used for EXPLICIT_ID Sharding methods or null. + */ + QName getExplicitIdProperty(String coreName); + + /** + * Returns the list with the numbers of the registered Shard Instances. + * + * @param coreName is the name of the SOLR core: alfresco, archive + * @return Ordered list of numbers of the registered Shard Instances + */ + Set getShardInstanceList(String coreName); + }