public class BatchOptions extends Object implements Cloneable
EventDataBatch.| Constructor and Description |
|---|
BatchOptions() |
| Modifier and Type | Method and Description |
|---|---|
BatchOptions |
clone()
Creates a shallow clone of this instance.
|
int |
getMaximumSizeInBytes()
Gets the maximum size to allow for the batch of events, in bytes.
|
String |
getPartitionId()
Gets the identifier of the Event Hub partition that the events in the
EventDataBatch will be sent to. |
String |
getPartitionKey()
Gets the partition routing key on an event batch.
|
BatchOptions |
setMaximumSizeInBytes(int maximumSizeInBytes)
Sets the maximum size for the
batch of events, in bytes. |
BatchOptions |
setPartitionId(String partitionId)
Sets the identifier of the Event Hub partition that the events in the
EventDataBatch will be sent to. |
BatchOptions |
setPartitionKey(String partitionKey)
Sets a hashing key to be provided for the batch of events.
|
public BatchOptions setMaximumSizeInBytes(int maximumSizeInBytes)
batch of events, in bytes.maximumSizeInBytes - The maximum size to allow for the batch of events.BatchOptions object.public int getMaximumSizeInBytes()
public BatchOptions setPartitionKey(String partitionKey)
partitionKey are hashed
and sent to the same partition.partitionKey - The partition hashing key to associate with the event or batch of events.BatchOptions object.public String getPartitionKey()
public String getPartitionId()
EventDataBatch will be sent to. If
the identifier is not specified, the Event Hubs service will be responsible for routing events that are sent to
an available partition.EventDataBatch will be set to. null or
an empty string if Event Hubs service is responsible for routing events.public BatchOptions setPartitionId(String partitionId)
EventDataBatch will be sent to. If
the identifier is not specified, the Event Hubs service will be responsible for routing events that are sent to
an available partition.partitionId - The identifier of the Event Hub partition that the batch's events
will be sent to. null or an empty string if Event Hubs service is responsible for routing events.BatchOptions object.public BatchOptions clone()
Copyright © 2019 Microsoft Corporation. All rights reserved.