Class HierarchicalUsagePropertyProvider
java.lang.Object
org.axonframework.update.configuration.HierarchicalUsagePropertyProvider
- All Implemented Interfaces:
UsagePropertyProvider
@Internal
public class HierarchicalUsagePropertyProvider
extends Object
implements UsagePropertyProvider
Combines multiple
UsagePropertyProvider instances into a single provider.
It will return the first non-null value for each property from the list of providers, sorted by their priority.- Since:
- 5.0.0
- Author:
- Mitchell Herrijgers
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newHierarchicalUsagePropertyProviderwith the given list of providers. -
Method Summary
-
Constructor Details
-
HierarchicalUsagePropertyProvider
Creates a newHierarchicalUsagePropertyProviderwith the given list of providers. The providers will be sorted by their priority in descending order, meaning the highest priority provider will be checked first.- Parameters:
providers- The list ofUsagePropertyProviderinstances to combine.
-
-
Method Details
-
getDisabled
Description copied from interface:UsagePropertyProviderReturns whether the Anonymous Usage Collection is disabled.- Specified by:
getDisabledin interfaceUsagePropertyProvider- Returns:
trueif the collection is disabled,nullif not specified, orfalseif enabled.
-
getUrl
Description copied from interface:UsagePropertyProviderReturns the URL for the Anonymous Usage Collection endpoint.- Specified by:
getUrlin interfaceUsagePropertyProvider- Returns:
- The URL as a
String, ornullif not specified.
-
priority
public int priority()Description copied from interface:UsagePropertyProviderReturns the priority of this property provider. Higher values indicate higher priority. Providers with higher priority will be checked first when retrieving properties.- Specified by:
priorityin interfaceUsagePropertyProvider- Returns:
- An
intrepresenting the priority of this provider.
-