Class PartitionOwnership

java.lang.Object
com.azure.messaging.eventhubs.models.PartitionOwnership

public class PartitionOwnership extends Object
A model class to hold partition ownership information.
  • Constructor Details

    • PartitionOwnership

      public PartitionOwnership()
  • Method Details

    • getFullyQualifiedNamespace

      public String getFullyQualifiedNamespace()
      Returns the fully qualified namespace of the Event Hub.
      Returns:
      the fully qualified namespace of the Event Hub.
    • setFullyQualifiedNamespace

      public PartitionOwnership setFullyQualifiedNamespace(String fullyQualifiedNamespace)
      Sets the fully qualified namespace of the Event Hub.
      Parameters:
      fullyQualifiedNamespace - the fully qualified namespace of the Event Hub.
      Returns:
      The updated PartitionOwnership instance.
    • getEventHubName

      public String getEventHubName()
      Gets the Event Hub name associated with this ownership record.
      Returns:
      The Event Hub name associated with this ownership record.
    • setEventHubName

      public PartitionOwnership setEventHubName(String eventHubName)
      Sets the Event Hub name associated with this ownership record.
      Parameters:
      eventHubName - The Event Hub name associated with this ownership record.
      Returns:
      The updated PartitionOwnership instance.
    • getConsumerGroup

      public String getConsumerGroup()
      Gets the consumer group name associated with this ownership record.
      Returns:
      The consumer group name associated with this ownership record.
    • setConsumerGroup

      public PartitionOwnership setConsumerGroup(String consumerGroup)
      Sets the consumer group name associated with this ownership record.
      Parameters:
      consumerGroup - The consumer group name associated with this ownership record.
      Returns:
      The updated PartitionOwnership instance.
    • getPartitionId

      public String getPartitionId()
      Gets the partition id associated with this ownership record.
      Returns:
      The partition id associated with this ownership record.
    • setPartitionId

      public PartitionOwnership setPartitionId(String partitionId)
      Sets the partition id associated with this ownership record.
      Parameters:
      partitionId - The partition id associated with this ownership record.
      Returns:
      The updated PartitionOwnership instance.
    • getOwnerId

      public String getOwnerId()
      Sets the unique event processor identifier as the owner of the partition id in this ownership record.
      Returns:
      The unique event processor identifier as the owner of the partition id in this ownership record.
    • setOwnerId

      public PartitionOwnership setOwnerId(String ownerId)
      Returns the unique event processor identifier that owns the partition id in this ownership record.
      Parameters:
      ownerId - The unique event processor identifier that owns the partition id in this ownership record.
      Returns:
      The updated PartitionOwnership instance.
    • getLastModifiedTime

      public Long getLastModifiedTime()
      Gets the last modified time of this ownership record as epoch millis.
      Returns:
      The last modified time of this ownership record as epoch millis.
    • setLastModifiedTime

      public PartitionOwnership setLastModifiedTime(Long lastModifiedTime)
      Sets the last modified time of this ownership record as epoch millis.
      Parameters:
      lastModifiedTime - The last modified time of this ownership record as epoch millis.
      Returns:
      The updated PartitionOwnership instance.
    • getETag

      public String getETag()
      Gets the ETag that was generated by the last known successful update to the partition ownership record. An ETag is a unique identifier * that is generated when a data record is successfully created/updated. The ETag is used to achieve optimistic concurrency in a distributed event processor setup. When multiple instances of event processor try to update the same partition ownership record, ETag is used to verify that the last values read by the instance requesting the update is still the latest ETag for this record. If the ETag in the store does not match the ETag in the update request, then the update is expected to fail as there was an update since the last time an event processor read this record.
      Returns:
      The eTag for this ownership record.
    • setETag

      public PartitionOwnership setETag(String eTag)
      Sets the ETag with the last known successful update to partition ownership record. An ETag is a unique identifier that is generated when a data record is successfully created/updated. This ETag is used to achieve optimistic concurrency in a distributed event processor setup. When multiple instances of event processor try to update the same partition ownership record, ETag is used to verify that the last values read by the instance requesting the update is still the latest ETag for this record. If the ETag in the store does not match the ETag in the update request, then the update is expected to fail as there was an update since the last time an event processor read this record.
      Parameters:
      eTag - The eTag for this ownership record.
      Returns:
      The updated PartitionOwnership instance.