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;
}
Aggregations