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