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 MeteredTimestampedKeyValueStorewrapper that is used for recording operation metrics, and hence its inner KeyValueStore implementation do not need to provide its own metrics collecting functionality. The innerKeyValueStoreof this class is of type <Bytes,byte[]>, hence we useSerdes to convert from <K,ValueAndTimestamp<V>> to <Bytes,byte[]>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMeteredTimestampedKeyValueStore.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 org.apache.kafka.common.serialization.Serde<ValueAndTimestamp<V>>prepareValueSerdeForStore(org.apache.kafka.common.serialization.Serde<ValueAndTimestamp<V>> valueSerde, org.apache.kafka.common.serialization.Serde<?> contextKeySerde, org.apache.kafka.common.serialization.Serde<?> contextValueSerde)booleanputIfDifferentValues(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 org.apache.kafka.common.serialization.Serde<ValueAndTimestamp<V>> prepareValueSerdeForStore(org.apache.kafka.common.serialization.Serde<ValueAndTimestamp<V>> valueSerde, org.apache.kafka.common.serialization.Serde<?> contextKeySerde, org.apache.kafka.common.serialization.Serde<?> contextValueSerde)
- Overrides:
prepareValueSerdeForStorein classMeteredKeyValueStore<K,ValueAndTimestamp<V>>
-
getWithBinary
public MeteredTimestampedKeyValueStore.RawAndDeserializedValue<V> getWithBinary(K key)
-
putIfDifferentValues
public boolean putIfDifferentValues(K key, ValueAndTimestamp<V> newValue, byte[] oldSerializedValue)
-
-