use of com.github.fhuss.kafka.streams.cep.state.internal.AggregatesStoreImpl 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);
}
Aggregations