Class CollectionSetBuilder
- java.lang.Object
-
- org.opennms.netmgt.collection.support.builder.CollectionSetBuilder
-
public class CollectionSetBuilder extends Object
A fluent API for building aCollectionSet
. Many of the existing collectors end up implementing their collections, attributes and resource types. This class is intended to replace those and provide a common means for building the collection sets.- Author:
- jwhite
-
-
Constructor Summary
Constructors Constructor Description CollectionSetBuilder(CollectionAgent agent)
-
Method Summary
-
-
-
Constructor Detail
-
CollectionSetBuilder
public CollectionSetBuilder(CollectionAgent agent)
-
-
Method Detail
-
withStatus
public CollectionSetBuilder withStatus(CollectionStatus status)
-
withTimestamp
public CollectionSetBuilder withTimestamp(Date timestamp)
-
withGauge
public CollectionSetBuilder withGauge(Resource resource, String group, String name, Number value)
-
withCounter
public CollectionSetBuilder withCounter(Resource resource, String group, String name, Number value)
-
withNumericAttribute
public CollectionSetBuilder withNumericAttribute(Resource resource, String group, String name, Number value, AttributeType type)
-
withStringAttribute
public CollectionSetBuilder withStringAttribute(Resource resource, String group, String name, String value)
-
withIdentifiedNumericAttribute
public CollectionSetBuilder withIdentifiedNumericAttribute(Resource resource, String group, String name, Number value, AttributeType type, String metricId)
-
withIdentifiedStringAttribute
public CollectionSetBuilder withIdentifiedStringAttribute(Resource resource, String group, String name, String value, String metricId)
-
withAttribute
public CollectionSetBuilder withAttribute(Resource resource, String group, String name, String value, AttributeType type)
-
disableCounterPersistence
public CollectionSetBuilder disableCounterPersistence(boolean disableCounterPersistence)
-
withSequenceNumber
public CollectionSetBuilder withSequenceNumber(Long sequenceNumber)
-
build
public CollectionSetDTO build()
-
toCollectionResource
public static AbstractCollectionResource toCollectionResource(Resource resource, CollectionAgent agent)
-
getNumResources
public int getNumResources()
-
getNumAttributes
public int getNumAttributes()
-
-