Class LatencyCollectionResource
- java.lang.Object
-
- org.opennms.netmgt.collection.api.LatencyCollectionResource
-
- All Implemented Interfaces:
CollectionResource
,CollectionVisitable
,Persistable
,ResourceIdentifier
public class LatencyCollectionResource extends 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(String serviceName, String ipAddress, 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 TypeString
getInstance()
getInstanceString
getInterfaceLabel()
getLabelString
getIpAddress()
getIpAddressString
getOwnerName()
getOwnerNameResourcePath
getParent()
Returns the name of the parent resource.ResourcePath
getPath()
Retrieves path for the resource, relative to the root of the associatedRrdRepository
.String
getResourceTypeName()
getResourceTypeNameString
getServiceName()
getServiceNameTimeKeeper
getTimeKeeper()
Returns a not-nullTimeKeeper
instance when this resource requires to use a special timestamp when updating RRDs/JRBs.String
getUnmodifiedInstance()
getUnmodifiedInstanceboolean
rescanNeeded()
rescanNeededboolean
shouldPersist(ServiceParameters params)
Determines whether the attribute should be persisted.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)
-
-
-
Method Detail
-
getInstance
public String getInstance()
getInstance
- Specified by:
getInstance
in interfaceCollectionResource
- Returns:
- a
String
object.
-
getUnmodifiedInstance
public String getUnmodifiedInstance()
getUnmodifiedInstance
- Specified by:
getUnmodifiedInstance
in interfaceCollectionResource
- Returns:
- a
String
object.
-
getInterfaceLabel
public String getInterfaceLabel()
getLabel
- Specified by:
getInterfaceLabel
in interfaceCollectionResource
- Returns:
- a
String
object.
-
getResourceTypeName
public 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 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.
-
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.
-
-