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