public class SnmpCollectionSet extends Object implements Collectable, CollectionSet
SnmpCollectionSet class.
After creation, be sure to call setCollectionTimestamp with the time the collection is taken It is inappropriate to require it in the constructor, as instances may be created independently and at a different time from when the data is collected. (They're not currently, but it's better not to make assumptions)Modifier and Type | Class and Description |
---|---|
static class |
SnmpCollectionSet.RescanNeeded |
Constructor and Description |
---|
SnmpCollectionSet(SnmpCollectionAgent agent,
OnmsSnmpCollection snmpCollection,
LocationAwareSnmpClient client)
Constructor for SnmpCollectionSet.
|
Modifier and Type | Method and Description |
---|---|
protected SnmpWalker |
createWalker()
createWalker
|
protected SnmpCollectionAgent |
getAgent() |
SnmpAgentConfig |
getAgentConfig()
getAgentConfig
|
SnmpCollectionAgent |
getCollectionAgent()
getCollectionAgent
|
Date |
getCollectionTimestamp()
Returns the timestamp of when this data collection was taken.
|
CollectionTracker |
getCollectionTracker()
getCollectionTracker
|
protected Collection<SnmpAttributeType> |
getGenericIndexAttributeTypes()
getGenericIndexAttributeTypes
|
SnmpIfCollector |
getIfCollector()
getIfCollector
|
IfNumberTracker |
getIfNumber()
getIfNumber
|
SnmpNodeCollector |
getNodeCollector()
getNodeCollector
|
NodeInfo |
getNodeInfo()
getNodeInfo
|
Collection<? extends CollectionResource> |
getResources()
getResources
|
CollectionStatus |
getStatus() |
SysUpTimeTracker |
getSysUpTime()
getSysUpTime
|
boolean |
ignorePersist()
ignorePersist
|
void |
notifyIfNotFound(CollectionAttributeType attrType,
SnmpResult res)
notifyIfNotFound
|
boolean |
rescanNeeded()
rescanNeeded
|
void |
setCollectionTimestamp(Date m_timestamp) |
String |
toString()
toString
|
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, wait, wait, wait
getSequenceNumber
public SnmpCollectionSet(SnmpCollectionAgent agent, OnmsSnmpCollection snmpCollection, LocationAwareSnmpClient client)
Constructor for SnmpCollectionSet.
agent
- a CollectionAgent
object.snmpCollection
- a OnmsSnmpCollection
object.public String toString()
toString
public SnmpIfCollector getIfCollector()
getIfCollector
SnmpIfCollector
object.public IfNumberTracker getIfNumber()
getIfNumber
IfNumberTracker
object.public SysUpTimeTracker getSysUpTime()
getSysUpTime
SysUpTimeTracker
object.public SnmpNodeCollector getNodeCollector()
getNodeCollector
SnmpNodeCollector
object.public SnmpCollectionAgent getCollectionAgent()
getCollectionAgent
CollectionAgent
object.protected Collection<SnmpAttributeType> getGenericIndexAttributeTypes()
getGenericIndexAttributeTypes
Collection
object.public CollectionTracker getCollectionTracker()
getCollectionTracker
getCollectionTracker
in interface Collectable
CollectionTracker
object.public Collection<? extends CollectionResource> getResources()
getResources
Collection
object.public void visit(CollectionSetVisitor visitor)
visit
in interface CollectionVisitable
visitor
- a CollectionSetVisitor
object.protected SnmpWalker createWalker()
createWalker
SnmpWalker
object.public boolean rescanNeeded()
rescanNeeded
public SnmpAgentConfig getAgentConfig()
getAgentConfig
SnmpAgentConfig
object.public void notifyIfNotFound(CollectionAttributeType attrType, SnmpResult res)
notifyIfNotFound
attrType
- a CollectionAttributeType
object.res
- a SnmpResult
object.public CollectionStatus getStatus()
getStatus
in interface CollectionSet
public boolean ignorePersist()
ignorePersist
ignorePersist
in interface CollectionSet
public Date getCollectionTimestamp()
CollectionSet
getCollectionTimestamp
in interface CollectionSet
public void setCollectionTimestamp(Date m_timestamp)
protected SnmpCollectionAgent getAgent()
Copyright © 2021. All rights reserved.