public class EmptyResourceStorageDao extends Object implements ResourceStorageDao
| Constructor and Description |
|---|
EmptyResourceStorageDao() |
| Modifier and Type | Method and Description |
|---|---|
Set<ResourcePath> |
children(ResourcePath path,
int depth)
Retrieves the set of child paths one level bellow the given
path which contain one or more metrics at the given depth.
|
boolean |
delete(ResourcePath path)
Deletes all of the resources and metric bellow
the given path.
|
boolean |
exists(ResourcePath path,
int depth)
Verifies if a path contains one or more metrics
at the given depth.
|
boolean |
existsWithin(ResourcePath path,
int depth)
Verifies if a path contains one or more metrics within
the given depth.
|
Set<OnmsAttribute> |
getAttributes(ResourcePath path)
Retrieves the set of (resource-level) attributes stored at the given path.
|
Map<String,String> |
getMetaData(ResourcePath path)
Retrieves the meta-data stored at the given path.
|
String |
getStringAttribute(ResourcePath path,
String key)
Returns the value for the given (resource-level) attribute, or null if it does not exist.
|
Map<String,String> |
getStringAttributes(ResourcePath path)
Returns the value for the given (resource-level) attribute, or null if it does not exist.
|
void |
setStringAttribute(ResourcePath path,
String key,
String value)
Sets the specified (resource-level) attribute at the given path.
|
void |
updateMetricToResourceMappings(ResourcePath path,
Map<String,String> metricsNameToResourceNames)
Maps the given metric names to the their associated resources names.
|
public boolean exists(ResourcePath path, int depth)
ResourceStorageDaoFor example, assume we are working with file-system paths, and we have the following file on disk /a/b/c/some.metric. The function should behave as follows:
exists in interface ResourceStorageDaopath - resource path used as the root of the checkdepth - a non-negative integerpublic boolean existsWithin(ResourcePath path, int depth)
ResourceStorageDaoFor example, assume we are working with file-system paths, and we have the following file on disk /a/b/c/some.metric. The function should behave as follows:
existsWithin in interface ResourceStorageDaopath - resource path used as the root of the checkdepth - a non-negative integerpublic Set<ResourcePath> children(ResourcePath path, int depth)
ResourceStorageDaoFor example, assume we are working with file-system paths, and we have the following file on disk /a/b/c/some.metric. The function should behave as follows:
children in interface ResourceStorageDaopath - resource path used as the root of the checkdepth - a positive integerpublic boolean delete(ResourcePath path)
ResourceStorageDaodelete in interface ResourceStorageDaopublic Set<OnmsAttribute> getAttributes(ResourcePath path)
ResourceStorageDaogetAttributes in interface ResourceStorageDaopublic void setStringAttribute(ResourcePath path, String key, String value)
ResourceStorageDaosetStringAttribute in interface ResourceStorageDaopublic String getStringAttribute(ResourcePath path, String key)
ResourceStorageDaogetStringAttribute in interface ResourceStorageDaopublic Map<String,String> getStringAttributes(ResourcePath path)
ResourceStorageDaogetStringAttributes in interface ResourceStorageDaopublic void updateMetricToResourceMappings(ResourcePath path, Map<String,String> metricsNameToResourceNames)
ResourceStorageDaoupdateMetricToResourceMappings in interface ResourceStorageDaopath - parent resource pathmetricsNameToResourceNames - metric to resource mappingspublic Map<String,String> getMetaData(ResourcePath path)
ResourceStorageDaogetMetaData in interface ResourceStorageDaoCopyright © 2020. All rights reserved.