org.apache.storm.state

## Interface StateEncoder<K,V,KENCODEDT,VENCODEDT>

- All Known Implementing Classes:
    DefaultStateEncoder

      public interface StateEncoder<K,V,KENCODEDT,VENCODEDT>

  The interface of State Encoder.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `K` | `decodeKey(KENCODEDT encodedKey)` Decode key.
    `V` | `decodeValue(VENCODEDT encodedValue)` Decode value.
    `KENCODEDT` | `encodeKey(K key)` Encode key.
    `VENCODEDT` | `encodeValue(V value)` Encode value.
    `VENCODEDT` | `getTombstoneValue()` Get the tombstone value (deletion mark).

- - ### Method Detail

    - #### encodeKey

          KENCODEDT encodeKey(K key)

      Encode key.

      Parameters:
        `key` - the value of key (K type)
      Returns:
        the encoded value of key (KENCODEDT type)

    - #### encodeValue

          VENCODEDT encodeValue(V value)

      Encode value.

      Parameters:
        `value` - the value of value (V type)
      Returns:
        the encoded value of value (VENCODEDT type)

    - #### decodeKey

          K decodeKey(KENCODEDT encodedKey)

      Decode key.

      Parameters:
        `encodedKey` - the value of key (KRAW type)
      Returns:
        the decoded value of key (K type)

    - #### decodeValue

          V decodeValue(VENCODEDT encodedValue)

      Decode value.

      Parameters:
        `encodedValue` - the value of key (VENCODEDT type)
      Returns:
        the decoded value of key (V type)

    - #### getTombstoneValue

          VENCODEDT getTombstoneValue()

      Get the tombstone value (deletion mark).

      Returns:
        the tomestone value (VENCODEDT type)

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