Package 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 Description KdecodeKey(KENCODEDT encodedKey)Decode key.VdecodeValue(VENCODEDT encodedValue)Decode value.KENCODEDTencodeKey(K key)Encode key.VENCODEDTencodeValue(V value)Encode value.VENCODEDTgetTombstoneValue()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)
-
-