Class SingleResourceCollectionSet
- java.lang.Object
-
- org.opennms.netmgt.collection.support.AbstractCollectionSet
-
- org.opennms.netmgt.collection.support.SingleResourceCollectionSet
-
- All Implemented Interfaces:
CollectionSet
,CollectionVisitable
public class SingleResourceCollectionSet extends AbstractCollectionSet
This is a simpleCollectionSet
that is used to encapsulate the collection of a single resource. The status is initially set toServiceCollector#COLLECTION_FAILED
. It is up to the collector to set it to a different value upon collection completion.
-
-
Constructor Summary
Constructors Constructor Description SingleResourceCollectionSet(CollectionResource resource, Date timestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectionResource
getCollectionResource()
Date
getCollectionTimestamp()
Returns the timestamp of when this data collection was taken.CollectionStatus
getStatus()
void
setStatus(CollectionStatus status)
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)-
Methods inherited from class org.opennms.netmgt.collection.support.AbstractCollectionSet
ignorePersist
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.collection.api.CollectionSet
getSequenceNumber
-
-
-
-
Constructor Detail
-
SingleResourceCollectionSet
public SingleResourceCollectionSet(CollectionResource resource, Date timestamp)
-
-
Method Detail
-
getStatus
public final CollectionStatus getStatus()
-
setStatus
public final void setStatus(CollectionStatus status)
-
getCollectionResource
public final CollectionResource getCollectionResource()
-
visit
public final void visit(CollectionSetVisitor visitor)
Description copied from interface:CollectionVisitable
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)- Parameters:
visitor
- aCollectionSetVisitor
object.
-
getCollectionTimestamp
public final Date getCollectionTimestamp()
Description copied from interface:CollectionSet
Returns the timestamp of when this data collection was taken. Used by thresholding.- Returns:
-
-