Last active
May 7, 2018 08:39
-
-
Save abhirockzz/c154f4c6af1676424ebb1197b0e56f1f to your computer and use it in GitHub Desktop.
Kafka Streams Stores factory example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stores.KeyValueFactory<String,Double> baseKVFactory = Stores.create("my-state-store") | |
.withStringKeys() | |
.withDoubleValues(); | |
Stores.InMemoryKeyValueFactory<String, Double> inMemoryKVFactory = baseKVFactory.inMemory(); //ON-heap | |
StateStoreSupplier imMemoryStateStoreSupplier = inMemoryKVFactory.build(); | |
Stores.PersistentValueFactory<String, Double> persistentKVFactory = baseKVFactory.persistent(); //OFF-heap | |
StateStoreSupplier persistentStateStoreSupplier = persistentKVFactory.build(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
does is work ?