public class CollectionResourceWrapper extends Object implements CollectionResource
RESOURCE_TYPE_IF, RESOURCE_TYPE_LATENCY, RESOURCE_TYPE_NODE
Constructor and Description |
---|
CollectionResourceWrapper(CollectionResource wrapped) |
Modifier and Type | Method and Description |
---|---|
String |
getInstance()
Returns the name of the instance this
CollectionResource represents. |
String |
getInterfaceLabel()
Returns a unique label for each resource depending on resource type.
|
String |
getOwnerName()
getOwnerName
|
ResourcePath |
getParent()
Returns the name of the parent resource.
|
ResourcePath |
getPath()
Retrieves path for the resource, relative to the root of the
associated
RrdRepository . |
String |
getResourceTypeName()
Returns a string which indicates what type of resource.
|
TimeKeeper |
getTimeKeeper()
Returns a not-null
TimeKeeper instance when this resource requires to use a special timestamp when updating RRDs/JRBs. |
String |
getUnmodifiedInstance()
Returns the unmodified instance string this
CollectionResource represents. |
boolean |
rescanNeeded()
rescanNeeded
|
boolean |
shouldPersist(ServiceParameters params)
Determines whether the attribute should be persisted.
|
void |
visit(CollectionSetVisitor visitor)
Provide a way to visit all the values in the CollectionSet, for any appropriate purposes (persisting, thresholding, or others)
The expectation is that calling this method will ultimately call visitResource, visitGroup and visitAttribute (as appropriate)
|
public CollectionResourceWrapper(CollectionResource wrapped)
public String getOwnerName()
getOwnerName
getOwnerName
in interface ResourceIdentifier
String
object.public ResourcePath getPath()
RrdRepository
.getPath
in interface ResourceIdentifier
ResourcePath
object.public void visit(CollectionSetVisitor visitor)
visit
in interface CollectionVisitable
visitor
- a CollectionSetVisitor
object.public boolean shouldPersist(ServiceParameters params)
shouldPersist
in interface Persistable
params
- a ServiceParameters
object.public boolean rescanNeeded()
rescanNeeded
rescanNeeded
in interface CollectionResource
public String getResourceTypeName()
getResourceTypeName
in interface CollectionResource
String
object.public ResourcePath getParent()
getParent
in interface CollectionResource
String
object.public String getInstance()
CollectionResource
represents. For node level resources, this will be null
to indicate the default instance. For interface level resources, some label unique to the node (ifIndex probably).
For Generic resources (e.g. the SNMP GenericIndexResource
), this will be some identifying label, probably the index in the table.
This value is used by the StorageStrategy
implementations to figure out the label for the resource which
is used in constructing its RRD directory.getInstance
in interface CollectionResource
String
object.public String getUnmodifiedInstance()
CollectionResource
represents.getUnmodifiedInstance
in interface CollectionResource
String
object.public String getInterfaceLabel()
getInterfaceLabel
in interface CollectionResource
String
object.public TimeKeeper getTimeKeeper()
TimeKeeper
instance when this resource requires to use a special timestamp when updating RRDs/JRBs.
If the resource doesn't need a special TimeKeeper
it should return null.getTimeKeeper
in interface CollectionResource
TimeKeeper
object or null to indicate that DefaultTimeKeeper
should be used.Copyright © 2021. All rights reserved.