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 voidaddAttribute(CollectionAttribute attr)Adds the given attribute into the collection for this resourceAttributeGroupgetGroup(AttributeGroupType groupType)Finds, or creates, and returns the AttributeGroup for the given group TypeStringgetInstance()getInstanceStringgetInterfaceLabel()getLabelStringgetIpAddress()getIpAddressStringgetOwnerName()getOwnerNameResourcePathgetParent()Returns the name of the parent resource.ResourcePathgetPath()Retrieves path for the resource, relative to the root of the associatedRrdRepository.StringgetResourceTypeName()getResourceTypeNameStringgetServiceName()getServiceNameTimeKeepergetTimeKeeper()Returns a not-nullTimeKeeperinstance when this resource requires to use a special timestamp when updating RRDs/JRBs.StringgetUnmodifiedInstance()getUnmodifiedInstancebooleanrescanNeeded()rescanNeededbooleanshouldPersist(ServiceParameters params)Determines whether the attribute should be persisted.StringtoString()voidvisit(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:
getInstancein interfaceCollectionResource- Returns:
- a
Stringobject.
-
getUnmodifiedInstance
public String getUnmodifiedInstance()
getUnmodifiedInstance
- Specified by:
getUnmodifiedInstancein interfaceCollectionResource- Returns:
- a
Stringobject.
-
getInterfaceLabel
public String getInterfaceLabel()
getLabel
- Specified by:
getInterfaceLabelin interfaceCollectionResource- Returns:
- a
Stringobject.
-
getResourceTypeName
public String getResourceTypeName()
getResourceTypeName
- Specified by:
getResourceTypeNamein interfaceCollectionResource- Returns:
- a
Stringobject.
-
rescanNeeded
public boolean rescanNeeded()
rescanNeeded
- Specified by:
rescanNeededin interfaceCollectionResource- Returns:
- a boolean.
-
shouldPersist
public boolean shouldPersist(ServiceParameters params)
Determines whether the attribute should be persisted.- Specified by:
shouldPersistin interfacePersistable- Parameters:
params- aServiceParametersobject.- 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- aAttributeGroupTypeobject.- Returns:
- a
AttributeGroupobject.
-
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:
visitin interfaceCollectionVisitable- Parameters:
visitor- aCollectionSetVisitorobject.
-
getOwnerName
public String getOwnerName()
getOwnerName
- Specified by:
getOwnerNamein interfaceResourceIdentifier- Returns:
- a
Stringobject.
-
getPath
public ResourcePath getPath()
Description copied from interface:ResourceIdentifierRetrieves path for the resource, relative to the root of the associatedRrdRepository.- Specified by:
getPathin interfaceResourceIdentifier- Returns:
ResourcePathobject.
-
getParent
public ResourcePath getParent()
Description copied from interface:CollectionResourceReturns the name of the parent resource.- Specified by:
getParentin interfaceCollectionResource- Returns:
- a
Stringobject.
-
getTimeKeeper
public TimeKeeper getTimeKeeper()
Description copied from interface:CollectionResourceReturns a not-nullTimeKeeperinstance when this resource requires to use a special timestamp when updating RRDs/JRBs. If the resource doesn't need a specialTimeKeeperit should return null.- Specified by:
getTimeKeeperin interfaceCollectionResource- Returns:
- a
TimeKeeperobject or null to indicate thatDefaultTimeKeepershould be used.
-
-