public interface EventPosition extends Serializable
EventData in the event hub partition.
The position can be an Offset, Sequence Number, or EnqueuedTime.| Modifier and Type | Method and Description |
|---|---|
static EventPosition |
fromEndOfStream()
Returns the position for the end of a stream.
|
static EventPosition |
fromEnqueuedTime(Instant dateTime)
Creates a position at the given
Instant. |
static EventPosition |
fromOffset(String offset)
Creates a position at the given offset.
|
static EventPosition |
fromOffset(String offset,
boolean inclusiveFlag)
Creates a position at the given offset.
|
static EventPosition |
fromSequenceNumber(Long sequenceNumber)
Creates a position at the given sequence number.
|
static EventPosition |
fromSequenceNumber(Long sequenceNumber,
boolean inclusiveFlag)
Creates a position at the given sequence number.
|
static EventPosition |
fromStartOfStream()
Returns the position for the start of a stream.
|
Instant |
getEnqueuedTime()
Gets the enqueued time.
|
boolean |
getInclusiveFlag()
Gets the inclusive value.
|
String |
getOffset()
Gets the offset.
|
Long |
getSequenceNumber()
Gets the sequence number.
|
static EventPosition fromOffset(String offset)
offset - is the byte offset of the event.EventPosition object.static EventPosition fromOffset(String offset, boolean inclusiveFlag)
offset - is the byte offset of the event.inclusiveFlag - will include the specified event when set to true; otherwise, the next event is returned.EventPosition object.static EventPosition fromSequenceNumber(Long sequenceNumber)
sequenceNumber - is the sequence number of the event.EventPosition object.static EventPosition fromSequenceNumber(Long sequenceNumber, boolean inclusiveFlag)
sequenceNumber - is the sequence number of the event.inclusiveFlag - will include the specified event when set to true; otherwise, the next event is returned.EventPosition object.static EventPosition fromEnqueuedTime(Instant dateTime)
Instant.dateTime - is the enqueued time of the event.EventPosition object.static EventPosition fromStartOfStream()
EventPosition set to the start of an Event Hubs stream.static EventPosition fromEndOfStream()
EventPosition set to the end of an Event Hubs stream.Long getSequenceNumber()
Instant getEnqueuedTime()
String getOffset()
boolean getInclusiveFlag()
Copyright © 2019. All rights reserved.