Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Because of that, we should throw different exceptions for each type.

Proposed Changes

The following is the public methods that users will call for get state store instance or get store values:

  • KafkaStreams
    • store()
  • interface ReadOnlyKeyValueStore(class CompositeReadOnlyKeyValueStore)
    • get(k)
    • range(from, to)
    • all()
    • approximateNumEntries()
  • interface ReadOnlySessionStore(class CompositeReadOnlySessionStore)
    • fetch(k)
    • fetch(from, to)
  • interface ReadOnlyWindowStore(class CompositeReadOnlyWindowStore)
    • fetch(k, rf, tt)
    • fetch(from, to, rf, tt)
    • all()
    • fetchAll()
  • interface KeyValueIterator(class DelegatingPeekingKeyValueIterator)
    • next()
    • hasNext()
    • peekNextKey()

We need handle all InvalidStateStoreExceptions better during these public methods invoked. The main change is to introduce new exceptions that extend from InvalidStateStoreException. InvalidStateStoreException is not thrown at all anymore, but only new sub-classes.

...

The interface QueryableStoreType will append a new method. This can be assigned KafkaStreams instance to all ComposeReadOnlyXXXXStore instance QueryableStoreType instances for checking KafkaStreams instance state.

Code Block
languagejava
public interface QueryableStoreType<T> {
  void setStreams(final KafkaStreams streams);
}

The following is the public method that users will call:

...

  • store()

...

  • get(k)
  • range(from, to)
  • all()
  • approximateNumEntries()

...

  • fetch(k)
  • fetch(from, to)

...

  • fetch(k, rf, tt)
  • fetch(from, to, rf, tt)
  • all()
  • fetchAll()

...


Call Trace

Expand
titleCall trace 1: KafkaStreams#store()
  • KafkaStreams#store() (v)
    • QueryableStoreProvider#getStore() (v)
      • GlobalStateStoreProvider#stores() (v)
      • StreamThreadStateStroeProvider#stores() (v)

...