public final class EventPositionImpl extends Object implements EventPosition
| Modifier and Type | Method and Description |
|---|---|
static EventPositionImpl |
fromEndOfStream()
Returns the position for the end of a stream.
|
static EventPositionImpl |
fromEnqueuedTime(Instant dateTime)
Creates a position at the given
Instant. |
static EventPositionImpl |
fromOffset(String offset)
Creates a position at the given offset.
|
static EventPositionImpl |
fromOffset(String offset,
boolean inclusiveFlag)
Creates a position at the given offset.
|
static EventPositionImpl |
fromSequenceNumber(Long sequenceNumber)
Creates a position at the given sequence number.
|
static EventPositionImpl |
fromSequenceNumber(Long sequenceNumber,
boolean inclusiveFlag)
Creates a position at the given sequence number.
|
static EventPositionImpl |
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.
|
String |
toString() |
public static EventPositionImpl fromOffset(String offset)
EventPositionfromOffset in interface EventPositionoffset - is the byte offset of the event.EventPosition object.public static EventPositionImpl fromOffset(String offset, boolean inclusiveFlag)
EventPositionfromOffset in interface EventPositionoffset - 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.public static EventPositionImpl fromSequenceNumber(Long sequenceNumber)
EventPositionfromSequenceNumber in interface EventPositionsequenceNumber - is the sequence number of the event.EventPosition object.public static EventPositionImpl fromSequenceNumber(Long sequenceNumber, boolean inclusiveFlag)
EventPositionfromSequenceNumber in interface EventPositionsequenceNumber - 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.public static EventPositionImpl fromEnqueuedTime(Instant dateTime)
EventPositionInstant.fromEnqueuedTime in interface EventPositiondateTime - is the enqueued time of the event.EventPosition object.public static EventPositionImpl fromStartOfStream()
EventPositionfromStartOfStream in interface EventPositionEventPosition set to the start of an Event Hubs stream.public static EventPositionImpl fromEndOfStream()
EventPositionfromEndOfStream in interface EventPositionEventPosition set to the end of an Event Hubs stream.public Long getSequenceNumber()
EventPositiongetSequenceNumber in interface EventPositionpublic Instant getEnqueuedTime()
EventPositiongetEnqueuedTime in interface EventPositionpublic String getOffset()
EventPositiongetOffset in interface EventPositionpublic boolean getInclusiveFlag()
EventPositiongetInclusiveFlag in interface EventPositionCopyright © 2019. All rights reserved.