org.apache.storm.kafka.trident

## Class TridentKafkaState<K,V>

- java.lang.Object
- - org.apache.storm.kafka.trident.TridentKafkaState<K,V>

- All Implemented Interfaces:
    State

      public class TridentKafkaState<K,V>
      extends Object
      implements State

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TridentKafkaState()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beginCommit(Long txid)`
    `void` | `commit(Long txid)`
    `void` | `prepare(Properties options)` Prepare this State.
    `void` | `updateState(List<TridentTuple> tuples, TridentCollector collector)` Write the given tuples to Kafka.
    `TridentKafkaState<K,V>` | `withKafkaTopicSelector(KafkaTopicSelector selector)`
    `TridentKafkaState<K,V>` | `withTridentTupleToKafkaMapper(TridentTupleToKafkaMapper<K,V> mapper)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TridentKafkaState

          public TridentKafkaState()

  - ### Method Detail

    - #### withTridentTupleToKafkaMapper

          public TridentKafkaState<K,V> withTridentTupleToKafkaMapper(TridentTupleToKafkaMapper<K,V> mapper)

    - #### withKafkaTopicSelector

          public TridentKafkaState<K,V> withKafkaTopicSelector(KafkaTopicSelector selector)

    - #### beginCommit

          public void beginCommit(Long txid)

      Specified by:
        `beginCommit` in interface `State`

    - #### commit

          public void commit(Long txid)

      Specified by:
        `commit` in interface `State`

    - #### prepare

          public void prepare(Properties options)

      Prepare this State.

      Parameters:
        `options` - The KafkaProducer config.

    - #### updateState

          public void updateState(List<TridentTuple> tuples,
                                  TridentCollector collector)

      Write the given tuples to Kafka.

      Parameters:
        `tuples` - The tuples to write.
        `collector` - The Trident collector.

Copyright © 2021 The Apache Software Foundation. All rights reserved.