### YamlMime:JavaType
uid: "com.azure.messaging.eventhubs.models.EventPosition"
fullName: "com.azure.messaging.eventhubs.models.EventPosition"
name: "EventPosition"
nameWithType: "EventPosition"
summary: "Defines a position of an in the Event Hub partition stream."
inheritances:
- ""
inheritedClassMethods:
- classRef: "java.lang.Object"
methodsRef:
- "clone"
- "equals"
- "finalize"
- "getClass"
- "hashCode"
- "notify"
- "notifyAll"
- "toString"
- "wait"
- "wait"
- "wait"
syntax: "public final class **EventPosition**"
methods:
- uid: "com.azure.messaging.eventhubs.models.EventPosition.earliest()"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.earliest()"
name: "earliest()"
nameWithType: "EventPosition.earliest()"
summary: "Corresponds to the location of the first event present in the partition."
modifiers:
- "static"
syntax: "public static EventPosition earliest()"
desc: "Corresponds to the location of the first event present in the partition. Use this position to begin receiving from the first event that was enqueued in the partition which has not expired due to the retention policy."
returns:
description: "An set to the start of an Event Hub stream."
type: ""
- uid: "com.azure.messaging.eventhubs.models.EventPosition.equals(java.lang.Object)"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.equals(Object obj)"
name: "equals(Object obj)"
nameWithType: "EventPosition.equals(Object obj)"
overridden: "java.lang.Object.equals(java.lang.Object)"
parameters:
- name: "obj"
type: "Object"
syntax: "public boolean equals(Object obj)"
returns:
type: ""
- uid: "com.azure.messaging.eventhubs.models.EventPosition.fromEnqueuedTime(java.time.Instant)"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.fromEnqueuedTime(Instant enqueuedDateTime)"
name: "fromEnqueuedTime(Instant enqueuedDateTime)"
nameWithType: "EventPosition.fromEnqueuedTime(Instant enqueuedDateTime)"
summary: "Creates a position at the given ."
modifiers:
- "static"
parameters:
- description: "The instant, in UTC, from which the next available event should be chosen."
name: "enqueuedDateTime"
type: "Instant"
syntax: "public static EventPosition fromEnqueuedTime(Instant enqueuedDateTime)"
desc: "Creates a position at the given . Corresponds to a specific instance within a partition to begin looking for an event. The event enqueued after the requested `enqueuedDateTime` becomes the current position."
returns:
description: "An object."
type: ""
- uid: "com.azure.messaging.eventhubs.models.EventPosition.fromOffset(long)"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.fromOffset(long offset)"
name: "fromOffset(long offset)"
nameWithType: "EventPosition.fromOffset(long offset)"
summary: "Creates a position to an event in the partition at the provided offset."
modifiers:
- "static"
parameters:
- description: "The offset of the event within that partition."
name: "offset"
type: ""
syntax: "public static EventPosition fromOffset(long offset)"
desc: "Creates a position to an event in the partition at the provided offset. The event at that offset will not be included. Instead, the next event is returned.\n\nThe offset is the relative position for event in the context of the stream. The offset should not be considered a stable value, as the same offset may refer to a different event as events reach the age limit for retention and are no longer visible within the stream."
returns:
description: "An object."
type: ""
- uid: "com.azure.messaging.eventhubs.models.EventPosition.fromSequenceNumber(long)"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.fromSequenceNumber(long sequenceNumber)"
name: "fromSequenceNumber(long sequenceNumber)"
nameWithType: "EventPosition.fromSequenceNumber(long sequenceNumber)"
summary: "Creates a position to an event in the partition at the provided sequence number."
modifiers:
- "static"
parameters:
- description: "is the sequence number of the event."
name: "sequenceNumber"
type: ""
syntax: "public static EventPosition fromSequenceNumber(long sequenceNumber)"
desc: "Creates a position to an event in the partition at the provided sequence number. The event with the sequence number will not be included. Instead, the next event is returned."
returns:
description: "An object."
type: ""
- uid: "com.azure.messaging.eventhubs.models.EventPosition.fromSequenceNumber(long,boolean)"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.fromSequenceNumber(long sequenceNumber, boolean isInclusive)"
name: "fromSequenceNumber(long sequenceNumber, boolean isInclusive)"
nameWithType: "EventPosition.fromSequenceNumber(long sequenceNumber, boolean isInclusive)"
summary: "Creates a position at the given sequence number."
modifiers:
- "static"
parameters:
- description: "is the sequence number of the event."
name: "sequenceNumber"
type: ""
- description: "If true, the event with the sequenceNumber
is included; otherwise, the next event\n will be received."
name: "isInclusive"
type: ""
syntax: "public static EventPosition fromSequenceNumber(long sequenceNumber, boolean isInclusive)"
desc: "Creates a position at the given sequence number. If `isInclusive` is true, the event with the same sequence number is returned. Otherwise, the next event in the sequence is received."
returns:
description: "An object."
type: ""
- uid: "com.azure.messaging.eventhubs.models.EventPosition.getEnqueuedDateTime()"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.getEnqueuedDateTime()"
name: "getEnqueuedDateTime()"
nameWithType: "EventPosition.getEnqueuedDateTime()"
summary: "Gets the instant, in UTC, from which the next available event should be chosen."
syntax: "public Instant getEnqueuedDateTime()"
desc: "Gets the instant, in UTC, from which the next available event should be chosen."
returns:
description: "The instant, in UTC, from which the next available event should be chosen."
type: "Instant"
- uid: "com.azure.messaging.eventhubs.models.EventPosition.getOffset()"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.getOffset()"
name: "getOffset()"
nameWithType: "EventPosition.getOffset()"
summary: "Gets the relative position for event in the context of the stream."
syntax: "public String getOffset()"
desc: "Gets the relative position for event in the context of the stream. The offset should not be considered a stable value, as the same offset may refer to a different event as events reach the age limit for retention and are no longer visible within the stream."
returns:
description: "The offset of the event within that partition."
type: "String"
- uid: "com.azure.messaging.eventhubs.models.EventPosition.getSequenceNumber()"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.getSequenceNumber()"
name: "getSequenceNumber()"
nameWithType: "EventPosition.getSequenceNumber()"
summary: "Gets the sequence number of the event."
syntax: "public Long getSequenceNumber()"
desc: "Gets the sequence number of the event."
returns:
description: "The sequence number of the event."
type: "Long"
- uid: "com.azure.messaging.eventhubs.models.EventPosition.hashCode()"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.hashCode()"
name: "hashCode()"
nameWithType: "EventPosition.hashCode()"
overridden: "java.lang.Object.hashCode()"
syntax: "public int hashCode()"
returns:
type: ""
- uid: "com.azure.messaging.eventhubs.models.EventPosition.isInclusive()"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.isInclusive()"
name: "isInclusive()"
nameWithType: "EventPosition.isInclusive()"
summary: "Gets the boolean value of if the event is included."
syntax: "public boolean isInclusive()"
desc: "Gets the boolean value of if the event is included. If true, the event with the `sequenceNumber` is included; otherwise, the next event will be received."
returns:
description: "The boolean if the event will be received."
type: ""
- uid: "com.azure.messaging.eventhubs.models.EventPosition.latest()"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.latest()"
name: "latest()"
nameWithType: "EventPosition.latest()"
summary: "Corresponds to the end of the partition, where no more events are currently enqueued."
modifiers:
- "static"
syntax: "public static EventPosition latest()"
desc: "Corresponds to the end of the partition, where no more events are currently enqueued. Use this position to begin receiving from the next event to be enqueued in the partition when invoked."
returns:
description: "An set to the end of an Event Hubs stream and listens for new events."
type: ""
- uid: "com.azure.messaging.eventhubs.models.EventPosition.toString()"
fullName: "com.azure.messaging.eventhubs.models.EventPosition.toString()"
name: "toString()"
nameWithType: "EventPosition.toString()"
overridden: "java.lang.Object.toString()"
syntax: "public String toString()"
returns:
type: "String"
type: "class"
desc: "Defines a position of an in the Event Hub partition stream. The position can be an offset, sequence number, or enqueued time in UTC."
metadata: {}
package: "com.azure.messaging.eventhubs.models"
artifact: com.azure:azure-messaging-eventhubs:5.19.1