use of com.github.fhuss.kafka.streams.cep.state.internal.SharedVersionedBufferStoreImpl in project kafkastreams-cep by fhussonnois.
the class NFATest method newNFA.
private <K, V> NFA<K, V> newNFA(Pattern<K, V> pattern, Serde<K> keySerde, Serde<V> valSerde) {
List<Stage<K, V>> stages = new StagesFactory<K, V>().make(pattern);
SharedVersionedBufferStore<K, V> bufferStore = new SharedVersionedBufferStoreImpl<>(new InMemoryKeyValueStore<>("test-buffer", Serdes.Bytes(), Serdes.ByteArray()), keySerde, valSerde);
bufferStore.init(new NoOpProcessorContext(), null);
AggregatesStore<K> aggStore = new AggregatesStoreImpl<>(new InMemoryKeyValueStore<>("test-aggregate", Serdes.Bytes(), Serdes.ByteArray()));
aggStore.init(new NoOpProcessorContext(), null);
return new NFA<>(aggStore, bufferStore, stages);
}
use of com.github.fhuss.kafka.streams.cep.state.internal.SharedVersionedBufferStoreImpl in project kafkastreams-cep by fhussonnois.
the class SharedVersionedBufferTest method getInMemorySharedBuffer.
@SuppressWarnings("unchecked")
private <K, V> SharedVersionedBufferStore<K, V> getInMemorySharedBuffer(Serde<K> keySerDe, Serde<V> valueSerDe) {
InMemoryKeyValueStore test = new InMemoryKeyValueStore("test", Serdes.Bytes(), Serdes.ByteArray());
SharedVersionedBufferStore<K, V> store = new SharedVersionedBufferStoreImpl<>(test, keySerDe, valueSerDe);
store.init(new NoOpProcessorContext(), null);
return store;
}
Aggregations