Interface CollectionContext
- All Known Implementing Classes:
EmptyCollectionContext, StandardCollectionContext
Describes one data collection operation for a
DataCollector, as a set of properties.
Standard contexts carry the full set; empty contexts carry few or none.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classKeys for the standard context properties. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Starts building aStandardCollectionContext.Returns the identifier of this collection, such as a tag group name.Returns the interval of a periodic collection.Returns the initiator of this collection, such as a tag provider name.Returns when the collection occurred.static CollectionContextempty()Returns an empty context with no collection parameters.<T> Optional<T> booleanhasProperty(Property<?> property) booleanisEmpty()Returns whether this context has no properties, or only default ones.default booleanReturns whether this is a heartbeat collection, which represents system health.default Optional<ValueOrigin> Returns whether the collected values come directly from the source or are observed or derived by the collector.
-
Method Details
-
hasProperty
-
getValue
-
getProperties
PropertySet getProperties() -
collectionId
-
collectionSource
-
collectionInterval
-
collectionTime
-
isHeartbeat
default boolean isHeartbeat()Returns whether this is a heartbeat collection, which represents system health.- Returns:
truefor a heartbeat.
-
valueOrigin
Returns whether the collected values come directly from the source or are observed or derived by the collector.- Returns:
- the origin, or empty if unavailable.
-
isEmpty
boolean isEmpty()Returns whether this context has no properties, or only default ones.- Returns:
truefor an empty context.
-
empty
Returns an empty context with no collection parameters.- Returns:
- the empty context.
-
builder
Starts building aStandardCollectionContext.- Returns:
- the first builder step.
-