Class LatencyCollectionResource
- java.lang.Object
-
- org.opennms.netmgt.collection.api.LatencyCollectionResource
-
- All Implemented Interfaces:
CollectionResource
,CollectionVisitable
,Persistable
,ResourceIdentifier
public class LatencyCollectionResource extends java.lang.Object implements CollectionResource
LatencyCollectionResource class.
- Version:
- $Id: $
- Author:
- Alejandro Galue
-
-
Field Summary
-
Fields inherited from interface org.opennms.netmgt.collection.api.CollectionResource
RESOURCE_TYPE_IF, RESOURCE_TYPE_LATENCY, RESOURCE_TYPE_NODE
-
-
Constructor Summary
Constructors Constructor Description LatencyCollectionResource(java.lang.String serviceName, java.lang.String ipAddress, java.lang.String location)
Constructor for LatencyCollectionResource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttribute(CollectionAttribute attr)
Adds the given attribute into the collection for this resourceAttributeGroup
getGroup(AttributeGroupType groupType)
Finds, or creates, and returns the AttributeGroup for the given group Typejava.lang.String
getInstance()
getInstancejava.lang.String
getInterfaceLabel()
getLabeljava.lang.String
getIpAddress()
getIpAddressjava.lang.String
getOwnerName()
getOwnerNameResourcePath
getParent()
Returns the name of the parent resource.ResourcePath
getPath()
Retrieves path for the resource, relative to the root of the associatedRrdRepository
.java.lang.String
getResourceTypeName()
getResourceTypeNamejava.lang.String
getServiceName()
getServiceNameTimeKeeper
getTimeKeeper()
Returns a not-nullTimeKeeper
instance when this resource requires to use a special timestamp when updating RRDs/JRBs.java.lang.String
getUnmodifiedInstance()
getUnmodifiedInstanceboolean
rescanNeeded()
rescanNeededboolean
shouldPersist(ServiceParameters params)
Determines whether the attribute should be persisted.java.lang.String
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)
-
-
-
Constructor Detail
-
LatencyCollectionResource
public LatencyCollectionResource(java.lang.String serviceName, java.lang.String ipAddress, java.lang.String location)
Constructor for LatencyCollectionResource.
- Parameters:
serviceName
- aString
object.ipAddress
- aString
object.location
- aString
object.
-
-
Method Detail
-
getInstance
public java.lang.String getInstance()
getInstance
- Specified by:
getInstance
in interfaceCollectionResource
- Returns:
- a
String
object.
-
getUnmodifiedInstance
public java.lang.String getUnmodifiedInstance()
getUnmodifiedInstance
- Specified by:
getUnmodifiedInstance
in interfaceCollectionResource
- Returns:
- a
String
object.
-
getServiceName
public java.lang.String getServiceName()
getServiceName
- Returns:
- a
String
object.
-
getIpAddress
public java.lang.String getIpAddress()
getIpAddress
- Returns:
- a
String
object.
-
getInterfaceLabel
public java.lang.String getInterfaceLabel()
getLabel
- Specified by:
getInterfaceLabel
in interfaceCollectionResource
- Returns:
- a
String
object.
-
getResourceTypeName
public java.lang.String getResourceTypeName()
getResourceTypeName
- Specified by:
getResourceTypeName
in interfaceCollectionResource
- Returns:
- a
String
object.
-
rescanNeeded
public boolean rescanNeeded()
rescanNeeded
- Specified by:
rescanNeeded
in interfaceCollectionResource
- Returns:
- a boolean.
-
shouldPersist
public boolean shouldPersist(ServiceParameters params)
Determines whether the attribute should be persisted.- Specified by:
shouldPersist
in interfacePersistable
- Parameters:
params
- aServiceParameters
object.- Returns:
- a boolean.
-
addAttribute
public void addAttribute(CollectionAttribute attr)
Adds the given attribute into the collection for this resource- Parameters:
attr
- The Attribute to add
-
getGroup
public final AttributeGroup getGroup(AttributeGroupType groupType)
Finds, or creates, and returns the AttributeGroup for the given group Type- Parameters:
groupType
- aAttributeGroupType
object.- Returns:
- a
AttributeGroup
object.
-
visit
public 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)- Specified by:
visit
in interfaceCollectionVisitable
- Parameters:
visitor
- aCollectionSetVisitor
object.
-
getOwnerName
public java.lang.String getOwnerName()
getOwnerName
- Specified by:
getOwnerName
in interfaceResourceIdentifier
- Returns:
- a
String
object.
-
getPath
public ResourcePath getPath()
Description copied from interface:ResourceIdentifier
Retrieves path for the resource, relative to the root of the associatedRrdRepository
.- Specified by:
getPath
in interfaceResourceIdentifier
- Returns:
ResourcePath
object.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getParent
public ResourcePath getParent()
Description copied from interface:CollectionResource
Returns the name of the parent resource.- Specified by:
getParent
in interfaceCollectionResource
- Returns:
- a
String
object.
-
getTimeKeeper
public TimeKeeper getTimeKeeper()
Description copied from interface:CollectionResource
Returns a not-nullTimeKeeper
instance when this resource requires to use a special timestamp when updating RRDs/JRBs. If the resource doesn't need a specialTimeKeeper
it should return null.- Specified by:
getTimeKeeper
in interfaceCollectionResource
- Returns:
- a
TimeKeeper
object or null to indicate thatDefaultTimeKeeper
should be used.
-
-