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

74 строки
6.7 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.messaging.eventhubs.EventDataBatch"
fullName: "com.azure.messaging.eventhubs.EventDataBatch"
name: "EventDataBatch"
nameWithType: "EventDataBatch"
summary: "A class for aggregating <xref uid=\"com.azure.messaging.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> into a single, size-limited, batch."
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 **EventDataBatch**"
methods:
- uid: "com.azure.messaging.eventhubs.EventDataBatch.getCount()"
fullName: "com.azure.messaging.eventhubs.EventDataBatch.getCount()"
name: "getCount()"
nameWithType: "EventDataBatch.getCount()"
summary: "Gets the number of <xref uid=\"com.azure.messaging.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"events\"></xref> in the batch."
syntax: "public int getCount()"
desc: "Gets the number of <xref uid=\"com.azure.messaging.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"events\"></xref> in the batch."
returns:
description: "The number of <xref uid=\"com.azure.messaging.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"events\"></xref> in the batch."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventDataBatch.getMaxSizeInBytes()"
fullName: "com.azure.messaging.eventhubs.EventDataBatch.getMaxSizeInBytes()"
name: "getMaxSizeInBytes()"
nameWithType: "EventDataBatch.getMaxSizeInBytes()"
summary: "Gets the maximum size, in bytes, of the <xref uid=\"com.azure.messaging.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref>."
syntax: "public int getMaxSizeInBytes()"
desc: "Gets the maximum size, in bytes, of the <xref uid=\"com.azure.messaging.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref>."
returns:
description: "The maximum size, in bytes, of the <xref uid=\"com.azure.messaging.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref>."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventDataBatch.getSizeInBytes()"
fullName: "com.azure.messaging.eventhubs.EventDataBatch.getSizeInBytes()"
name: "getSizeInBytes()"
nameWithType: "EventDataBatch.getSizeInBytes()"
summary: "Gets the size of the <xref uid=\"com.azure.messaging.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref> in bytes."
syntax: "public int getSizeInBytes()"
desc: "Gets the size of the <xref uid=\"com.azure.messaging.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref> in bytes."
returns:
description: "the size of the <xref uid=\"com.azure.messaging.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref> in bytes."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventDataBatch.tryAdd(com.azure.messaging.eventhubs.EventData)"
fullName: "com.azure.messaging.eventhubs.EventDataBatch.tryAdd(EventData eventData)"
name: "tryAdd(EventData eventData)"
nameWithType: "EventDataBatch.tryAdd(EventData eventData)"
summary: "Tries to add an <xref uid=\"com.azure.messaging.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"event\"></xref> to the batch."
parameters:
- description: "The <xref uid=\"com.azure.messaging.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> to add to the batch."
name: "eventData"
type: "<xref href=\"com.azure.messaging.eventhubs.EventData?alt=com.azure.messaging.eventhubs.EventData&text=EventData\" data-throw-if-not-resolved=\"False\" />"
syntax: "public boolean tryAdd(EventData eventData)"
desc: "Tries to add an <xref uid=\"com.azure.messaging.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"event\"></xref> to the batch.\n\nThis method is not thread-safe; make sure to synchronize the method access when using multiple threads to add events."
returns:
description: "<code>true</code> if the event could be added to the batch; <code>false</code> if the event was too large to fit in\n the batch, to accommodate the event, the application should obtain a new <xref uid=\"com.azure.messaging.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref> object and\n add event to it."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "A class for aggregating <xref uid=\"com.azure.messaging.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> into a single, size-limited, batch. It is treated as a single message when sent to the Azure Event Hubs service. <xref uid=\"com.azure.messaging.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref> is recommended in scenarios requiring high throughput for publishing events."
metadata: {}
package: "com.azure.messaging.eventhubs"
artifact: com.azure:azure-messaging-eventhubs:5.19.1