public abstract class SnmpCollectionResource extends Object implements CollectionResource
Abstract SnmpCollectionResource class.
RESOURCE_TYPE_IF, RESOURCE_TYPE_LATENCY, RESOURCE_TYPE_NODE
Constructor and Description |
---|
SnmpCollectionResource(ResourceType def)
Constructor for SnmpCollectionResource.
|
Modifier and Type | Method and Description |
---|---|
CollectionAgent |
getCollectionAgent()
getCollectionAgent
|
protected Collection<AttributeGroup> |
getGroups()
getGroups
|
protected AttributeGroupType |
getGroupType(String groupName) |
String |
getOwnerName()
getOwnerName
|
ResourceType |
getResourceType()
getResourceType
|
abstract int |
getSnmpIfType()
Returns ifType; is (but not sure if it should be) -1 for non interface type collections, otherwise
the SNMP type of the interface.
|
List<CollectionAttribute> |
getStringAttributes() |
TimeKeeper |
getTimeKeeper()
Returns a not-null
TimeKeeper instance when this resource requires to use a special timestamp when updating RRDs/JRBs. |
boolean |
rescanNeeded()
rescanNeeded
|
void |
setAttributeValue(SnmpAttributeType type,
SnmpValue val)
setAttributeValue
|
abstract 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)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInstance, getInterfaceLabel, getParent, getResourceTypeName, getUnmodifiedInstance
getPath
public SnmpCollectionResource(ResourceType def)
Constructor for SnmpCollectionResource.
def
- a ResourceType
object.public ResourceType getResourceType()
getResourceType
ResourceType
object.public final CollectionAgent getCollectionAgent()
getCollectionAgent
CollectionAgent
object.public abstract boolean shouldPersist(ServiceParameters params)
shouldPersist
in interface Persistable
params
- a ServiceParameters
object.public String getOwnerName()
getOwnerName
getOwnerName
in interface ResourceIdentifier
String
object.public abstract int getSnmpIfType()
public boolean rescanNeeded()
rescanNeeded
rescanNeeded
in interface CollectionResource
public void setAttributeValue(SnmpAttributeType type, SnmpValue val)
setAttributeValue
type
- a SnmpAttributeType
object.val
- a SnmpValue
object.protected AttributeGroupType getGroupType(String groupName)
public void visit(CollectionSetVisitor visitor)
visit
in interface CollectionVisitable
visitor
- a CollectionSetVisitor
object.protected Collection<AttributeGroup> getGroups()
getGroups
Collection
object.public List<CollectionAttribute> getStringAttributes()
public TimeKeeper getTimeKeeper()
CollectionResource
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.