public class FilesystemResourceStorageDao extends Object implements ResourceStorageDao, org.springframework.beans.factory.InitializingBean
| Constructor and Description | 
|---|
FilesystemResourceStorageDao()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
afterPropertiesSet()  | 
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. 
 | 
File | 
getRrdDirectory()  | 
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 | 
setRrdDirectory(File rrdDirectory)  | 
void | 
setRrdExtension(String rrdExtension)  | 
void | 
setRrdStrategy(RrdStrategy<?,?> rrdStrategy)  | 
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 void afterPropertiesSet()
                        throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic 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 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 ResourceStorageDaopublic boolean delete(ResourcePath path)
ResourceStorageDaodelete in interface ResourceStorageDaopublic void setRrdDirectory(File rrdDirectory)
public File getRrdDirectory()
public void setRrdStrategy(RrdStrategy<?,?> rrdStrategy)
public void setRrdExtension(String rrdExtension)
Copyright © 2021. All rights reserved.