...
Code Block | ||||
---|---|---|---|---|
| ||||
public interface StoreTypeSpec { KeyValueBytesStoreSupplier keyValueStore(final KeyValueSupplierParameters params); WindowBytesStoreSupplier windowStore(final WindowSupplierParameters params); SessionBytesStoreSupplier sessionStore(final SessionSupplierParameters params); } // the below are all "struct"-like classes with the following fields class KeyValueSupplierParametersKeyValueSupplierParams(String name); class WindowSupplierParametersWindowSupplierParams(String name, Duration retentionPeriod, Duration windowSize, boolean retainDuplicates, EmityStrategyEmitStrategy emitStrategy); class SessionSupplierParametersSessionSupplierParams(String name, Duration retentionPeriod, EmityStrategyEmitStrategy emitStrategy); |
Info |
---|
Note on Evolving API: a concern raised on KIP-591 about having such an interface is that the increased API surface area would mean introducing new store implementations would cause custom state store implementations to throw compile time errors. Introducing the *Parameters classes will prevent such issues unless an entirely new store type is added. If an entirely new state store type (beyond KV/Windowed/Session) is added - I think it is valid to have new store types have a default implementation that throws |
...