public abstract class MetricsPropertyProvider extends AbstractPropertyProvider
Modifier and Type | Field and Description |
---|---|
protected String |
clusterNamePropertyId |
protected String |
componentNamePropertyId |
protected ComponentSSLConfiguration |
configuration |
protected String |
hostNamePropertyId |
protected MetricHostProvider |
hostProvider |
protected MetricsPaddingMethod |
metricsPaddingMethod |
protected static Pattern |
questionMarkPattern |
protected URLStreamProvider |
streamProvider |
Modifier | Constructor and Description |
---|---|
protected |
MetricsPropertyProvider(Map<String,Map<String,PropertyInfo>> componentPropertyInfoMap,
URLStreamProvider streamProvider,
ComponentSSLConfiguration configuration,
MetricHostProvider hostProvider,
String clusterNamePropertyId,
String hostNamePropertyId,
String componentNamePropertyId) |
Modifier and Type | Method and Description |
---|---|
static MetricsPropertyProviderProxy |
createInstance(Resource.Type type,
Map<String,Map<String,PropertyInfo>> componentPropertyInfoMap,
URLStreamProvider streamProvider,
ComponentSSLConfiguration configuration,
TimelineMetricCacheProvider cacheProvider,
MetricHostProvider hostProvider,
MetricsServiceProvider serviceProvider,
String clusterNamePropertyId,
String hostNamePropertyId,
String componentNamePropertyId) |
protected abstract String |
getComponentName(Resource resource)
Get the component name for the given resource.
|
protected abstract String |
getHostName(Resource resource)
Get the host name for the given resource.
|
static String |
getSetString(Set<String> set,
int limit)
Get a comma delimited string from the given set of strings or
an empty string if the size of the given set is greater than
the given limit.
|
Set<Resource> |
populateResources(Set<Resource> resources,
Request request,
Predicate predicate)
Populate the given set of resource with any properties that this property
provider can provide and return a populated set of resources.
|
protected abstract Set<Resource> |
populateResourcesWithProperties(Set<Resource> resources,
Request request,
Set<String> propertyIds)
Delegate implementation of populating resources to concrete providers.
|
checkAuthorizationForMetrics, checkPropertyCategory, getClustersNameFromResources, getClustersResourceId, getComponentMetrics, getPropertyInfoMap, getResourceTypeFromResources, getValue, isSupportedPropertyId, substituteArgument, updateComponentMetricMap, updatePropertyInfo, updatePropertyInfoMap
checkCategory, checkConfigPropertyIds, checkPropertyIds, containsArguments, getCategoryIds, getPropertyIds, getRegexEntry, getRegexGroups, getRequestPropertyIds, isPatternKey, isPropertyCategoryRequested, isPropertyEntryRequested, isPropertyRequested, setResourceProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkPropertyIds
protected static final Pattern questionMarkPattern
protected final URLStreamProvider streamProvider
protected final MetricHostProvider hostProvider
protected final String clusterNamePropertyId
protected final String hostNamePropertyId
protected final String componentNamePropertyId
protected final ComponentSSLConfiguration configuration
protected MetricsPaddingMethod metricsPaddingMethod
protected MetricsPropertyProvider(Map<String,Map<String,PropertyInfo>> componentPropertyInfoMap, URLStreamProvider streamProvider, ComponentSSLConfiguration configuration, MetricHostProvider hostProvider, String clusterNamePropertyId, String hostNamePropertyId, String componentNamePropertyId)
public static MetricsPropertyProviderProxy createInstance(Resource.Type type, Map<String,Map<String,PropertyInfo>> componentPropertyInfoMap, URLStreamProvider streamProvider, ComponentSSLConfiguration configuration, TimelineMetricCacheProvider cacheProvider, MetricHostProvider hostProvider, MetricsServiceProvider serviceProvider, String clusterNamePropertyId, String hostNamePropertyId, String componentNamePropertyId)
protected abstract String getHostName(Resource resource)
resource
- the resourceprotected abstract String getComponentName(Resource resource)
resource
- the resourcepublic Set<Resource> populateResources(Set<Resource> resources, Request request, Predicate predicate) throws SystemException
PropertyProvider
resources
- the resources to be populatedrequest
- the request object which defines the desired set of propertiespredicate
- the predicate object which filters which resources are returnedSystemException
- thrown if resources cannot be populatedprotected abstract Set<Resource> populateResourcesWithProperties(Set<Resource> resources, Request request, Set<String> propertyIds) throws SystemException
resources
- @Resourcerequest
- @RequestpropertyIds
- Set of idsSystemException
public static String getSetString(Set<String> set, int limit)
set
- the set of stringslimit
- the upper size limit for the listCopyright © 2022 Apache Software Foundation. All rights reserved.