Interface PollContext.PollItem<T,A>
- Type Parameters:
T- the generic type for the generated message's payloadA- 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 Summary
Modifier and TypeMethodDescriptionAssociates this item to a unique identifier.Sets the item content in the form of aResultsetWatermark(Serializable watermark) Sets the watermark value associated to this item.
-
Method Details
-
getSourceCallbackContext
SourceCallbackContext getSourceCallbackContext()- Returns:
- The
SourceCallbackContext
-
setResult
Sets the item content in the form of aResult- Parameters:
result- aResult- Returns:
thisinstance- Throws:
IllegalArgumentException- if theresultisnull
-
setWatermark
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
watermarkvalue is notComparable, then a customComparatorshould be provided throughPollContext.setWatermarkComparator(Comparator)- Parameters:
watermark- a watermark value- Returns:
thisinstance
-
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:
thisinstance
-