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

tech.ydb.topic.read.MessageAccumulator Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package tech.ydb.topic.read;

import tech.ydb.topic.read.events.DataReceivedEvent;

/**
 * A common interface that is used to accumulate several {@link Message}s or/and
 * {@link tech.ydb.topic.read.events.DataReceivedEvent}s to commit later all at once or to add to transaction.
 *
 * @author Nikolay Perfilov
 */
public interface MessageAccumulator {

    /**
     * Adds a {@link Message} to commit it later or to add to transaction
     *
     * @param message a {@link Message}
     */
    void add(Message message);

    /**
     * Adds a {@link DataReceivedEvent} to commit all its messages later or to add to transaction
     *
     * @param event a {@link DataReceivedEvent}
     */
    void add(DataReceivedEvent event);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy