Class PartitionOwnership
java.lang.Object
com.azure.messaging.eventhubs.models.PartitionOwnership
A model class to hold partition ownership information.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the consumer group name associated with this ownership record.getETag()
Gets the ETag that was generated by the last known successful update to the partition ownership record.Gets the Event Hub name associated with this ownership record.Returns the fully qualified namespace of the Event Hub.Gets the last modified time of this ownership record as epoch millis.Sets the unique event processor identifier as the owner of the partition id in this ownership record.Gets the partition id associated with this ownership record.setConsumerGroup
(String consumerGroup) Sets the consumer group name associated with this ownership record.Sets the ETag with the last known successful update to partition ownership record.setEventHubName
(String eventHubName) Sets the Event Hub name associated with this ownership record.setFullyQualifiedNamespace
(String fullyQualifiedNamespace) Sets the fully qualified namespace of the Event Hub.setLastModifiedTime
(Long lastModifiedTime) Sets the last modified time of this ownership record as epoch millis.setOwnerId
(String ownerId) Returns the unique event processor identifier that owns the partition id in this ownership record.setPartitionId
(String partitionId) Sets the partition id associated with this ownership record.
-
Constructor Details
-
PartitionOwnership
public PartitionOwnership()Creates a new instance.
-
-
Method Details
-
getFullyQualifiedNamespace
Returns the fully qualified namespace of the Event Hub.- Returns:
- the fully qualified namespace of the Event Hub.
-
setFullyQualifiedNamespace
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
Gets the Event Hub name associated with this ownership record.- Returns:
- The Event Hub name associated with this ownership record.
-
setEventHubName
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
Gets the consumer group name associated with this ownership record.- Returns:
- The consumer group name associated with this ownership record.
-
setConsumerGroup
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
Gets the partition id associated with this ownership record.- Returns:
- The partition id associated with this ownership record.
-
setPartitionId
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
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
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
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
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
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
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.
-