public interface ResourceStorageDao
ResourceDao
,
ResourcePath
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.
|
boolean exists(ResourcePath path, int depth)
For 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:
path
- resource path used as the root of the checkdepth
- a non-negative integerboolean existsWithin(ResourcePath path, int depth)
For 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:
path
- resource path used as the root of the checkdepth
- a non-negative integerSet<ResourcePath> children(ResourcePath path, int depth)
For 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:
path
- resource path used as the root of the checkdepth
- a positive integerboolean delete(ResourcePath path)
Set<OnmsAttribute> getAttributes(ResourcePath path)
void setStringAttribute(ResourcePath path, String key, String value)
String getStringAttribute(ResourcePath path, String key)
Map<String,String> getStringAttributes(ResourcePath path)
void updateMetricToResourceMappings(ResourcePath path, Map<String,String> metricsNameToResourceNames)
path
- parent resource pathmetricsNameToResourceNames
- metric to resource mappingsMap<String,String> getMetaData(ResourcePath path)
Copyright © 2021. All rights reserved.