public class CollectionResourceWrapper extends Object
CollectionResourceWrapper class.
Wraps a CollectionResource with some methods and caching for the efficient application of thresholds (without pulling thresholding code into CollectionResource itself) A fresh instance should be created for each collection cycle (assumptions are made based on that premise)| Modifier and Type | Class and Description |
|---|---|
static class |
CollectionResourceWrapper.CacheEntry
Keeps track of both the Double value, and when it was collected, for the static cache of attributes
This is necessary for the *correct* calculation of Counter rates, across variable collection times and possible
collection failures (see NMS-4244)
|
| Constructor and Description |
|---|
CollectionResourceWrapper(Date collectionTimestamp,
int nodeId,
String hostAddress,
String serviceName,
RrdRepository repository,
CollectionResource resource,
Map<String,CollectionAttribute> attributes,
ResourceStorageDao resourceStorageDao)
Constructor for CollectionResourceWrapper.
|
| Modifier and Type | Method and Description |
|---|---|
Double |
getAttributeValue(String ds)
getAttributeValue
|
String |
getDsLabel()
getDsLabel
|
String |
getFieldValue(String ds)
getFieldValue
|
String |
getHostAddress()
getHostAddress
|
String |
getIfIndex()
getIfIndex
|
protected String |
getIfInfoValue(String attribute)
getIfInfoValue
|
String |
getIfLabel()
getIfLabel
|
String |
getInstance()
getInstance
|
String |
getInstanceLabel()
getInstanceLabel
|
int |
getNodeId()
getNodeId
|
RrdRepository |
getRepository()
getRepository
|
String |
getResourceId()
getResourceId
|
String |
getResourceTypeName()
getResourceTypeName
|
String |
getServiceName()
getServiceName
|
boolean |
isAnInterfaceResource()
isAnInterfaceResource
|
boolean |
isNodeResource()
isNodeResource
|
boolean |
isValidInterfaceResource()
isValidInterfaceResource
|
void |
setCounterReset(boolean counterReset) |
void |
setDsLabel(String dsLabel)
setDsLabel
|
String |
toString() |
public CollectionResourceWrapper(Date collectionTimestamp, int nodeId, String hostAddress, String serviceName, RrdRepository repository, CollectionResource resource, Map<String,CollectionAttribute> attributes, ResourceStorageDao resourceStorageDao)
Constructor for CollectionResourceWrapper.
interval - a long.nodeId - a int.hostAddress - a String object.serviceName - a String object.repository - a RrdRepository object.resource - a CollectionResource object.attributes - a Map object.public void setCounterReset(boolean counterReset)
public int getNodeId()
getNodeId
public RrdRepository getRepository()
getRepository
RrdRepository object.public String getResourceTypeName()
getResourceTypeName
String object.public String getResourceId()
getResourceId
Inspired by DefaultKscReportService
String object.public boolean isNodeResource()
isNodeResource
public boolean isAnInterfaceResource()
isAnInterfaceResource
public boolean isValidInterfaceResource()
isValidInterfaceResource
Copyright © 2020. All rights reserved.