Package com.tangosol.net.topic
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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Subscriber.CommitResult
commit()
Commit this position in the element's owning channel.CompletableFuture<Subscriber.CommitResult>
commitAsync()
Commit this position in the element's owning channel.Binary
getBinaryValue()
Returns the element's value in serialized form.int
getChannel()
Return the channel that the element was received from.Position
getPosition()
Returns the position of this element within the channel in a topic.Instant
getTimestamp()
Return the timestamp that the element was published.V
getValue()
Return the received value
-
-
-
Method Detail
-
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
CompletableFuture<Subscriber.CommitResult> 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
-
-