Class MeteredTimestampedKeyValueStore<K,V>
- java.lang.Object
-
- org.apache.kafka.streams.state.internals.WrappedStateStore<KeyValueStore<org.apache.kafka.common.utils.Bytes,byte[]>,K,V>
-
- org.apache.kafka.streams.state.internals.MeteredKeyValueStore<K,ValueAndTimestamp<V>>
-
- org.apache.kafka.streams.state.internals.MeteredTimestampedKeyValueStore<K,V>
-
- Type Parameters:
K
-V
-
- All Implemented Interfaces:
StateStore
,CachedStateStore<K,ValueAndTimestamp<V>>
,KeyValueStore<K,ValueAndTimestamp<V>>
,ReadOnlyKeyValueStore<K,ValueAndTimestamp<V>>
,TimestampedKeyValueStore<K,V>
public class MeteredTimestampedKeyValueStore<K,V> extends MeteredKeyValueStore<K,ValueAndTimestamp<V>> implements TimestampedKeyValueStore<K,V>
A MeteredTimestampedKeyValueStore
wrapper that is used for recording operation metrics, and hence its inner KeyValueStore implementation do not need to provide its own metrics collecting functionality. The innerKeyValueStore
of this class is of type <Bytes,byte[]>, hence we useSerde
s to convert from <K,ValueAndTimestamp<V>> to <Bytes,byte[]>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MeteredTimestampedKeyValueStore.RawAndDeserializedValue<ValueType>
-
Field Summary
-
Fields inherited from class org.apache.kafka.streams.state.internals.MeteredKeyValueStore
getSensor, putSensor, time
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MeteredTimestampedKeyValueStore.RawAndDeserializedValue<V>
getWithBinary(K key)
protected Serde<ValueAndTimestamp<V>>
prepareValueSerdeForStore(Serde<ValueAndTimestamp<V>> valueSerde, Serde<?> contextKeySerde, Serde<?> contextValueSerde)
boolean
putIfDifferentValues(K key, ValueAndTimestamp<V> newValue, byte[] oldSerializedValue)
-
Methods inherited from class org.apache.kafka.streams.state.internals.MeteredKeyValueStore
all, approximateNumEntries, close, delete, flush, get, init, keyBytes, outerValue, put, putAll, putIfAbsent, range, setFlushListener
-
Methods inherited from class org.apache.kafka.streams.state.internals.WrappedStateStore
isOpen, isTimestamped, name, persistent, wrapped
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.kafka.streams.state.KeyValueStore
delete, put, putAll, putIfAbsent
-
Methods inherited from interface org.apache.kafka.streams.state.ReadOnlyKeyValueStore
all, approximateNumEntries, get, range
-
Methods inherited from interface org.apache.kafka.streams.processor.StateStore
close, flush, init, isOpen, name, persistent
-
-
-
-
Method Detail
-
prepareValueSerdeForStore
protected Serde<ValueAndTimestamp<V>> prepareValueSerdeForStore(Serde<ValueAndTimestamp<V>> valueSerde, Serde<?> contextKeySerde, Serde<?> contextValueSerde)
- Overrides:
prepareValueSerdeForStore
in classMeteredKeyValueStore<K,ValueAndTimestamp<V>>
-
getWithBinary
public MeteredTimestampedKeyValueStore.RawAndDeserializedValue<V> getWithBinary(K key)
-
putIfDifferentValues
public boolean putIfDifferentValues(K key, ValueAndTimestamp<V> newValue, byte[] oldSerializedValue)
-
-