Package com.azure.messaging.eventhubs
Class PartitionProperties
java.lang.Object
com.azure.messaging.eventhubs.PartitionProperties
A set of information for a single partition of an Event Hub.
-
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the starting sequence number of the partition's message stream.Gets the name of the Event Hub that contains the partition.getId()
Gets the identifier of the partition within the Event Hub.Gets the offset of the last enqueued message in the partition's stream.long
Gets the last sequence number of the partition's message stream.Gets the instant, in UTC, of the last enqueued message in the partition's stream.boolean
isEmpty()
Indicates whether or not the partition is currently empty.
-
Method Details
-
getEventHubName
Gets the name of the Event Hub that contains the partition.- Returns:
- The name of the Event Hub that contains the partition.
-
getId
Gets the identifier of the partition within the Event Hub.- Returns:
- The identifier of the partition within the Event Hub.
-
getBeginningSequenceNumber
public long getBeginningSequenceNumber()Gets the starting sequence number of the partition's message stream.- Returns:
- The starting sequence number of the partition's message stream.
-
getLastEnqueuedSequenceNumber
public long getLastEnqueuedSequenceNumber()Gets the last sequence number of the partition's message stream.- Returns:
- The last sequence number of the partition's message stream.
-
getLastEnqueuedOffset
Gets the offset of the last enqueued message in the partition's stream.The 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:
- The offset of the last enqueued message in the partition's stream.
-
getLastEnqueuedTime
Gets the instant, in UTC, of the last enqueued message in the partition's stream.- Returns:
- The instant, in UTC, of the last enqueued message in the partition's stream.
-
isEmpty
public boolean isEmpty()Indicates whether or not the partition is currently empty.- Returns:
true
if there are no events, andfalse
otherwise.
-