azure-docs-sdk-java/docs-ref-autogen/com.microsoft.azure.eventhu...

102 строки
12 KiB
YAML

### YamlMime:JavaType
uid: "com.microsoft.azure.eventhubs.ReceiverOptions"
fullName: "com.microsoft.azure.eventhubs.ReceiverOptions"
name: "ReceiverOptions"
nameWithType: "ReceiverOptions"
summary: "Represents various optional behaviors which can be turned on or off during the creation of a <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver\"></xref>."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public final class **ReceiverOptions**"
constructors:
- uid: "com.microsoft.azure.eventhubs.ReceiverOptions.ReceiverOptions()"
fullName: "com.microsoft.azure.eventhubs.ReceiverOptions.ReceiverOptions()"
name: "ReceiverOptions()"
nameWithType: "ReceiverOptions.ReceiverOptions()"
syntax: "public ReceiverOptions()"
methods:
- uid: "com.microsoft.azure.eventhubs.ReceiverOptions.getIdentifier()"
fullName: "com.microsoft.azure.eventhubs.ReceiverOptions.getIdentifier()"
name: "getIdentifier()"
nameWithType: "ReceiverOptions.getIdentifier()"
summary: "Gets the identifier of the <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver\"></xref>"
syntax: "public String getIdentifier()"
desc: "Gets the identifier of the <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver\"></xref>"
returns:
description: "identifier of the <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver\"></xref>; null if nothing was set"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.microsoft.azure.eventhubs.ReceiverOptions.getPrefetchCount()"
fullName: "com.microsoft.azure.eventhubs.ReceiverOptions.getPrefetchCount()"
name: "getPrefetchCount()"
nameWithType: "ReceiverOptions.getPrefetchCount()"
summary: "Get Prefetch Count."
syntax: "public int getPrefetchCount()"
desc: "Get Prefetch Count."
returns:
description: "the upper limit of events this receiver will actively receive regardless of whether a receive operation is pending."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.ReceiverOptions.getReceiverRuntimeMetricEnabled()"
fullName: "com.microsoft.azure.eventhubs.ReceiverOptions.getReceiverRuntimeMetricEnabled()"
name: "getReceiverRuntimeMetricEnabled()"
nameWithType: "ReceiverOptions.getReceiverRuntimeMetricEnabled()"
summary: "Knob to enable/disable runtime metric of the receiver."
syntax: "public boolean getReceiverRuntimeMetricEnabled()"
desc: "Knob to enable/disable runtime metric of the receiver. If this is set to true and is passed to <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createReceiver*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient#createReceiver\"></xref>, after the first <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver.receive(int)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver#receive(int)\"></xref> call, <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver.getRuntimeInformation()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver#getRuntimeInformation()\"></xref> is populated.\n\nEnabling this knob will add 3 additional properties to all <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>'s received on the <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createReceiver*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient#createReceiver\"></xref>."
returns:
description: "the <xref uid=\"boolean\" data-throw-if-not-resolved=\"false\" data-raw-source=\"boolean\"></xref> indicating, whether, the runtime metric of the receiver was enabled"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.ReceiverOptions.setIdentifier(java.lang.String)"
fullName: "com.microsoft.azure.eventhubs.ReceiverOptions.setIdentifier(String value)"
name: "setIdentifier(String value)"
nameWithType: "ReceiverOptions.setIdentifier(String value)"
summary: "Set an identifier to <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver\"></xref>."
parameters:
- description: "string to identify <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver\"></xref>"
name: "value"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public void setIdentifier(String value)"
desc: "Set an identifier to <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver\"></xref>.\n\nThis identifier will be used by EventHubs service when reporting any errors across receivers, and is caused by this receiver. For example, when receiver quota limit is hit, while a user is trying to create New receiver, EventHubs service will throw <xref uid=\"com.microsoft.azure.eventhubs.QuotaExceededException\" data-throw-if-not-resolved=\"false\" data-raw-source=\"QuotaExceededException\"></xref> and will include this identifier. So, its very critical to choose a value, which can uniquely identify the whereabouts of <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver\"></xref>."
- uid: "com.microsoft.azure.eventhubs.ReceiverOptions.setPrefetchCount(int)"
fullName: "com.microsoft.azure.eventhubs.ReceiverOptions.setPrefetchCount(int prefetchCount)"
name: "setPrefetchCount(int prefetchCount)"
nameWithType: "ReceiverOptions.setPrefetchCount(int prefetchCount)"
summary: "Set the number of events that can be pre-fetched and cached at the <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver\"></xref>."
parameters:
- description: "the number of events to pre-fetch. value must be between 1 and 2000."
name: "prefetchCount"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setPrefetchCount(int prefetchCount)"
exceptions:
- description: "if setting prefetchCount encounters error"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Set the number of events that can be pre-fetched and cached at the <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver\"></xref>.\n\nBy default the value is 500"
- uid: "com.microsoft.azure.eventhubs.ReceiverOptions.setReceiverRuntimeMetricEnabled(boolean)"
fullName: "com.microsoft.azure.eventhubs.ReceiverOptions.setReceiverRuntimeMetricEnabled(boolean value)"
name: "setReceiverRuntimeMetricEnabled(boolean value)"
nameWithType: "ReceiverOptions.setReceiverRuntimeMetricEnabled(boolean value)"
summary: "Knob to enable/disable runtime metric of the receiver."
parameters:
- description: "the <xref uid=\"boolean\" data-throw-if-not-resolved=\"false\" data-raw-source=\"boolean\"></xref> to indicate, whether, the runtime metric of the receiver should be enabled"
name: "value"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setReceiverRuntimeMetricEnabled(boolean value)"
desc: "Knob to enable/disable runtime metric of the receiver. If this is set to true and is passed to <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createReceiver*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient#createReceiver\"></xref>, after the first <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver.receive(int)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver#receive(int)\"></xref> call, <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver.getRuntimeInformation()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver#getRuntimeInformation()\"></xref> and <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver.getEventPosition()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver#getEventPosition()\"></xref> will be populated.\n\nThis knob facilitates for an optimization where the Consumer of Event Hub has the end of stream details at the disposal, without making any additional <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.getPartitionRuntimeInformation(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient#getPartitionRuntimeInformation(String)\"></xref> call to Event Hubs service. To achieve this, behind the scenes, along with the actual <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>, that the Event Hubs <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver\"></xref> delivers, it includes extra information about the Event Hubs partitions end of stream details on every event. In summary, enabling this knob will help users to save an extra call to Event Hubs service to fetch Event Hubs partition information and as a result, will add that information as header to each <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> received by the client."
type: "class"
desc: "Represents various optional behaviors which can be turned on or off during the creation of a <xref uid=\"com.microsoft.azure.eventhubs.PartitionReceiver\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionReceiver\"></xref>."
metadata: {}
package: "com.microsoft.azure.eventhubs"
artifact: com.microsoft.azure:azure-eventhubs:3.2.2