Interface CollectionContext.Builder.OptionalStep

Enclosing class:
CollectionContext.Builder

public static interface CollectionContext.Builder.OptionalStep
Final step of the step builder, allowing optional parameters to be set.
  • Method Details

    • collectionInterval

      CollectionContext.Builder.OptionalStep collectionInterval(Duration collectionInterval)
      Sets the time interval for periodic collections. If not set, the collection is considered one-time or event-driven.
      Parameters:
      collectionInterval - The Duration between periodic collections.
      Returns:
      This step instance.
    • collectionTime

      CollectionContext.Builder.OptionalStep collectionTime(Instant collectionTime)
      Sets the collection time. If not set, the timestamp will be set to now.
      Parameters:
      collectionTime - The Instant timestamp indicating when a collection occurred.
      Returns:
      This step instance.
    • isHeartbeat

      CollectionContext.Builder.OptionalStep isHeartbeat(boolean isHeartbeat)
      Sets whether this is a heartbeat collection operation. Default is false if not set.
      Parameters:
      isHeartbeat - True if this is a heartbeat operation, false otherwise.
      Returns:
      This step instance.
    • withProperty

      <T> CollectionContext.Builder.OptionalStep withProperty(Property<T> key, T value)
      Associates a given key-value pair as a property of the current step. This method allows configuration of additional properties for the step builder.
      Type Parameters:
      T - The type of the property value.
      Parameters:
      key - The property to be added, represented by a Property instance.
      value - The value to associate with the given property key.
      Returns:
      This step instance.
    • build

      Builds and returns a new StandardCollectionContext instance.
      Returns:
      A new StandardCollectionContext instance with the configured values.