Class CollectionSetDTO
- java.lang.Object
-
- org.opennms.netmgt.collection.dto.CollectionSetDTO
-
- All Implemented Interfaces:
CollectionSet
,CollectionVisitable
public class CollectionSetDTO extends java.lang.Object implements CollectionSet
-
-
Constructor Summary
Constructors Constructor Description CollectionSetDTO()
CollectionSetDTO(CollectionAgent agent, CollectionStatus status, java.util.Date timestamp, java.util.Map<Resource,java.util.List<Attribute<?>>> attributesByResource, boolean disableCounterPersistence, java.lang.Long sequenceNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.Date
getCollectionTimestamp()
Returns the timestamp of when this data collection was taken.java.util.OptionalLong
getSequenceNumber()
CollectionStatus
getStatus()
int
hashCode()
boolean
ignorePersist()
ignorePersistjava.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
-
CollectionSetDTO
public CollectionSetDTO()
-
CollectionSetDTO
public CollectionSetDTO(CollectionAgent agent, CollectionStatus status, java.util.Date timestamp, java.util.Map<Resource,java.util.List<Attribute<?>>> attributesByResource, boolean disableCounterPersistence, java.lang.Long sequenceNumber)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getStatus
public CollectionStatus getStatus()
- Specified by:
getStatus
in interfaceCollectionSet
-
ignorePersist
public boolean ignorePersist()
Description copied from interface:CollectionSet
ignorePersist
- Specified by:
ignorePersist
in interfaceCollectionSet
- Returns:
- a boolean.
-
getCollectionTimestamp
public java.util.Date getCollectionTimestamp()
Description copied from interface:CollectionSet
Returns the timestamp of when this data collection was taken. Used by thresholding.- Specified by:
getCollectionTimestamp
in interfaceCollectionSet
- Returns:
-
visit
public 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)- Specified by:
visit
in interfaceCollectionVisitable
- Parameters:
visitor
- aCollectionSetVisitor
object.
-
getSequenceNumber
public java.util.OptionalLong getSequenceNumber()
- Specified by:
getSequenceNumber
in interfaceCollectionSet
- Returns:
- an optional containing the sequence number of the source this collection set was built from if applicable, otherwise an empty optional
-
-