Interface Configuration

    • Method Detail

      • getMemberShardNames

        @NonNull Collection<String> getMemberShardNames​(@NonNull MemberName memberName)
        Returns all the shard names that belong on the member by the given name.
      • getModuleNameFromNameSpace

        @Nullable String getModuleNameFromNameSpace​(@NonNull String nameSpace)
        Returns the module name for the given namespace name or null if not found.
      • getShardNameForModule

        @Nullable String getShardNameForModule​(@NonNull String moduleName)
        Returns the first shard name corresponding to the given module name or null if none is configured.
      • getShardNameForPrefix

        @Nullable String getShardNameForPrefix​(@NonNull DOMDataTreeIdentifier prefix)
        Return the shard name corresponding to the prefix, or null if none is configured.
      • getMembersFromShardName

        @NonNull Collection<MemberName> getMembersFromShardName​(@NonNull String shardName)
        Returns the member replicas for the given shard name.
      • getStrategyForModule

        @Nullable ShardStrategy getStrategyForModule​(@NonNull String moduleName)
        Returns the ShardStrategy for the given module name or null if the module is not found.
      • getAllShardNames

        Set<String> getAllShardNames()
        Returns all the configured shard names.
      • addModuleShardConfiguration

        void addModuleShardConfiguration​(@NonNull ModuleShardConfiguration config)
        Adds a new configuration for a module and shard.
      • addPrefixShardConfiguration

        void addPrefixShardConfiguration​(@NonNull PrefixShardConfiguration config)
        Adds a new configuration for a shard based on prefix.
      • removePrefixShardConfiguration

        void removePrefixShardConfiguration​(@NonNull DOMDataTreeIdentifier prefix)
        Removes a shard configuration for the specified prefix.
      • getAllPrefixShardConfigurations

        Map<DOMDataTreeIdentifier,​PrefixShardConfiguration> getAllPrefixShardConfigurations()
        Returns the configuration for all configured prefix shards.
        Returns:
        An immutable copy of the currently configured prefix shards.
      • getUniqueMemberNamesForAllShards

        Collection<MemberName> getUniqueMemberNamesForAllShards()
        Returns a unique set of all member names configured for all shards.
      • isShardConfigured

        boolean isShardConfigured​(String shardName)
      • addMemberReplicaForShard

        void addMemberReplicaForShard​(String shardName,
                                      MemberName memberName)
        Adds the given member as the new replica for the given shardName.
      • removeMemberReplicaForShard

        void removeMemberReplicaForShard​(String shardName,
                                         MemberName memberName)
        Removes the given member as a replica for the given shardName.
      • getStrategyForPrefix

        @Nullable ShardStrategy getStrategyForPrefix​(@NonNull DOMDataTreeIdentifier prefix)
        Returns the ShardStrategy for the given prefix or null if the prefix is not found.