Interface Subscriber.Element<V>

Type Parameters:
V - the type of value stored in the topic
Enclosing interface:
Subscriber<V>

public static interface Subscriber.Element<V>
Element represents a container for returned values.
  • Method Details

    • getValue

      V getValue()
      Return the received value
      Returns:
      the received value
    • getBinaryValue

      Binary getBinaryValue()
      Returns the element's value in serialized form.
      Returns:
      the element's value in serialized form
    • getChannel

      int getChannel()
      Return the channel that the element was received from.
      Returns:
      the channel that the element was received from
    • getPosition

      Position getPosition()
      Returns the position of this element within the channel in a topic.
      Returns:
      the position of this element within the channel in a topic
    • getTimestamp

      Instant getTimestamp()
      Return the timestamp that the element was published.

      The timestamp is the epoch time that the element was accepted into the topic taken from the cluster time on the member that accepted the published element.

      Returns:
      the published timestamp
    • commit

      default Subscriber.CommitResult commit()
      Commit this position in the element's owning channel.
      Returns:
      the result of the commit request
      Throws:
      UnsupportedOperationException - if this element implementation does not support committing
    • commitAsync

      Commit this position in the element's owning channel.
      Returns:
      the result of the commit request
      Throws:
      UnsupportedOperationException - if this element implementation does not support committing