Class TransactionalPublisherImpl<P extends GeneratedPublisher>

java.lang.Object
ru.tinkoff.kora.kafka.common.producer.TransactionalPublisherImpl<P>
All Implemented Interfaces:
ru.tinkoff.kora.application.graph.Lifecycle, TransactionalPublisher<P>

public final class TransactionalPublisherImpl<P extends GeneratedPublisher> extends Object implements TransactionalPublisher<P>, ru.tinkoff.kora.application.graph.Lifecycle
  • Constructor Details

  • Method Details

    • begin

      @Nonnull public final TransactionalPublisher.Transaction<P> begin()
      Description copied from interface: TransactionalPublisher
      Initialize Publisher in transaction mode Producer.initTransactions() and then begins transaction Producer.beginTransaction() and returns publisher in such state
      Specified by:
      begin in interface TransactionalPublisher<P extends GeneratedPublisher>
      Returns:
      Publisher as TransactionalPublisher

      It is expected that you will manually call Producer.commitTransaction() or Producer.abortTransaction() and then Producer.close()

    • returnToPool

      public final void returnToPool(P p)
    • deleteFromPool

      public final void deleteFromPool(P p)
    • init

      public void init()
      Specified by:
      init in interface ru.tinkoff.kora.application.graph.Lifecycle
    • release

      public void release() throws Exception
      Specified by:
      release in interface ru.tinkoff.kora.application.graph.Lifecycle
      Throws:
      Exception