com.azure.messaging.eventhubs.models.SendBatchSucceededContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-messaging-eventhubs Show documentation
Show all versions of azure-messaging-eventhubs Show documentation
Libraries built on Microsoft Azure Event Hubs
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.messaging.eventhubs.models;
import com.azure.messaging.eventhubs.EventData;
import com.azure.messaging.eventhubs.EventHubBufferedProducerAsyncClient;
import com.azure.messaging.eventhubs.EventHubBufferedProducerClient;
/**
* Contains information about a batch that was published and the partition that it was published to.
*
* @see EventHubBufferedProducerAsyncClient
* @see EventHubBufferedProducerClient
*/
public final class SendBatchSucceededContext {
private final String partitionId;
private final Iterable events;
/**
* Initializes a new instance of the class.
*
* @param events The set of events in the batch that was published.
* @param partitionId The identifier of the partition that the batch was published to.
*/
public SendBatchSucceededContext(Iterable events, String partitionId) {
this.events = events;
this.partitionId = partitionId;
}
/**
* Gets the set of events in the batch that was published.
*
* @return The set of events in the batch that was published.
*/
public Iterable getEvents() {
return events;
}
/**
* Gets the identifier of the partition that the batch was published to.
*
* @return The identifier of the partition that the batch was published to.
*/
public String getPartitionId() {
return partitionId;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy