Interface PollContext.PollItem<T,A>

Type Parameters:
T - the generic type for the generated message's payload
A - the generic type for the generated message's attributes
Enclosing interface:
PollContext<T,A>

public static interface PollContext.PollItem<T,A>
An item obtained through a poll
Since:
1.1
  • Method Details

    • getSourceCallbackContext

      SourceCallbackContext getSourceCallbackContext()
      Returns:
      The SourceCallbackContext
    • setResult

      PollContext.PollItem<T,A> setResult(Result<T,A> result)
      Sets the item content in the form of a Result
      Parameters:
      result - a Result
      Returns:
      this instance
      Throws:
      IllegalArgumentException - if the result is null
    • setWatermark

      PollContext.PollItem<T,A> setWatermark(Serializable watermark)
      Sets the watermark value associated to this item. This is the value that will be used to evaluate this item against the current watermark. If not provided, then no watermark filter will be applied.

      Remember that if the watermark value is not Comparable, then a custom Comparator should be provided through PollContext.setWatermarkComparator(Comparator)

      Parameters:
      watermark - a watermark value
      Returns:
      this instance
    • setId

      Associates this item to a unique identifier. If provided, the runtime will make sure that no other thread or cluster node is processing an item of the same id, providing processing idempotency. If not set, no such guarantees are offered.
      Parameters:
      id - a unique identifier
      Returns:
      this instance