Search in sources :

Example 1 with StreamThreadStateStoreProvider

use of org.apache.kafka.streams.state.internals.StreamThreadStateStoreProvider in project kafka by apache.

the class KafkaStreams method createAndAddStreamThread.

private StreamThread createAndAddStreamThread(final long cacheSizePerThread, final int threadIdx) {
    final StreamThread streamThread = StreamThread.create(topologyMetadata, applicationConfigs, clientSupplier, adminClient, processId, clientId, streamsMetrics, time, streamsMetadataState, cacheSizePerThread, stateDirectory, delegatingStateRestoreListener, threadIdx, KafkaStreams.this::closeToError, streamsUncaughtExceptionHandler);
    streamThread.setStateListener(streamStateListener);
    threads.add(streamThread);
    threadState.put(streamThread.getId(), streamThread.state());
    queryableStoreProvider.addStoreProviderForThread(streamThread.getName(), new StreamThreadStateStoreProvider(streamThread));
    return streamThread;
}
Also used : GlobalStreamThread(org.apache.kafka.streams.processor.internals.GlobalStreamThread) StreamThread(org.apache.kafka.streams.processor.internals.StreamThread) StreamThreadStateStoreProvider(org.apache.kafka.streams.state.internals.StreamThreadStateStoreProvider)

Aggregations

GlobalStreamThread (org.apache.kafka.streams.processor.internals.GlobalStreamThread)1 StreamThread (org.apache.kafka.streams.processor.internals.StreamThread)1 StreamThreadStateStoreProvider (org.apache.kafka.streams.state.internals.StreamThreadStateStoreProvider)1