use of org.apache.kafka.streams.state.internals.WindowStoreSupplier in project kafka by apache.
the class TopologyBuilder method createInternalTopicConfig.
private InternalTopicConfig createInternalTopicConfig(final StateStoreSupplier<?> supplier, final String name) {
if (!(supplier instanceof WindowStoreSupplier)) {
return new InternalTopicConfig(name, Collections.singleton(InternalTopicConfig.CleanupPolicy.compact), supplier.logConfig());
}
final WindowStoreSupplier windowStoreSupplier = (WindowStoreSupplier) supplier;
final InternalTopicConfig config = new InternalTopicConfig(name, Utils.mkSet(InternalTopicConfig.CleanupPolicy.compact, InternalTopicConfig.CleanupPolicy.delete), supplier.logConfig());
config.setRetentionMs(windowStoreSupplier.retentionPeriod());
return config;
}
Aggregations