All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.messaging.eventhubs.models.SendBatchSucceededContext Maven / Gradle / Ivy

There is a newer version: 5.19.2
Show newest version
// 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