Package org.apache.kafka.streams.kstream
Class StreamJoined<K,V1,V2>  
java.lang.Object
org.apache.kafka.streams.kstream.StreamJoined<K,V1,V2>  
- Type Parameters:
- K- the key type
- V1- this value type
- V2- other value type
Class used to configure the name of the join processor, the repartition topic name,
 state stores or state store names in  Stream-Stream join.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final booleanprotected final Stringprotected final WindowBytesStoreSupplierprotected final Stringprotected final WindowBytesStoreSupplier
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic <K,V1, V2> StreamJoined<K, V1, V2> Creates aStreamJoinedinstance using the provided name for the state stores and hence the changelog topics for the join stores.toString()static <K,V1, V2> StreamJoined<K, V1, V2> Creates aStreamJoinedinstance with the provided serdes to configure the stores for the join.static <K,V1, V2> StreamJoined<K, V1, V2> with(WindowBytesStoreSupplier storeSupplier, WindowBytesStoreSupplier otherStoreSupplier) Creates a StreamJoined instance with the provided store suppliers.withKeySerde(Serde<K> keySerde) Configure with the providedSerdefor the keyDisable change logging for both state stores.withLoggingEnabled(Map<String, String> config) Configures logging for both state stores.Set the name to use for the join processor and the repartition topic(s) if required.withOtherStoreSupplier(WindowBytesStoreSupplier otherStoreSupplier) Configure with the providedWindowBytesStoreSupplierfor the other store supplier.withOtherValueSerde(Serde<V2> otherValueSerde) Configure with the providedSerdefor the other valuewithStoreName(String storeName) Sets the base store name to use for both sides of the join.withThisStoreSupplier(WindowBytesStoreSupplier thisStoreSupplier) Configure with the providedWindowBytesStoreSupplierfor this store supplier.withValueSerde(Serde<V1> valueSerde) Configure with the providedSerdefor this value
- 
Field Details- 
keySerde
- 
valueSerde
- 
otherValueSerde
- 
thisStoreSupplier
- 
otherStoreSupplier
- 
name
- 
storeName
- 
loggingEnabledprotected final boolean loggingEnabled
- 
topicConfig
 
- 
- 
Constructor Details- 
StreamJoined
 
- 
- 
Method Details- 
withpublic static <K,V1, StreamJoined<K,V2> V1, withV2> (WindowBytesStoreSupplier storeSupplier, WindowBytesStoreSupplier otherStoreSupplier) Creates a StreamJoined instance with the provided store suppliers. The store suppliers must implement theWindowBytesStoreSupplierinterface. The store suppliers must provide unique names or aStreamsExceptionis thrown.- Type Parameters:
- K- the key type
- V1- this value type
- V2- other value type
- Parameters:
- storeSupplier- this store supplier
- otherStoreSupplier- other store supplier
- Returns:
- StreamJoinedinstance
 
- 
asCreates aStreamJoinedinstance using the provided name for the state stores and hence the changelog topics for the join stores. The name for the stores will be ${applicationId}-<storeName>-this-join and ${applicationId}-<storeName>-other-join or ${applicationId}-<storeName>-outer-this-join and ${applicationId}-<storeName>-outer-other-join depending if the join is an inner-join or an outer join. The changelog topics will have the -changelog suffix. The user should note that even though the join stores will have a specified name, the stores will remain unavailable for querying. Please note that if you are usingStreamJoinedto replace deprecatedKStream.join(org.apache.kafka.streams.kstream.KStream<K, VO>, org.apache.kafka.streams.kstream.ValueJoiner<? super V, ? super VO, ? extends VR>, org.apache.kafka.streams.kstream.JoinWindows)functions withJoinedparameters in order to set the name for the join processors, you would need to create theStreamJoinedobject first and then callwithName(java.lang.String)- Type Parameters:
- K- The key type
- V1- This value type
- V2- Other value type
- Parameters:
- storeName- The name to use for the store
- Returns:
- StreamJoinedinstance
 
- 
withpublic static <K,V1, StreamJoined<K,V2> V1, withV2> (Serde<K> keySerde, Serde<V1> valueSerde, Serde<V2> otherValueSerde) Creates aStreamJoinedinstance with the provided serdes to configure the stores for the join.- Type Parameters:
- K- The key type
- V1- This value type
- V2- Other value type
- Parameters:
- keySerde- The key serde
- valueSerde- This value serde
- otherValueSerde- Other value serde
- Returns:
- StreamJoinedinstance
 
- 
withNameSet the name to use for the join processor and the repartition topic(s) if required.- Parameters:
- name- the name to use
- Returns:
- a new StreamJoinedinstance
 
- 
withStoreNameSets the base store name to use for both sides of the join. The name for the state stores and hence the changelog topics for the join stores. The name for the stores will be ${applicationId}-<storeName>-this-join and ${applicationId}-<storeName>-other-join or ${applicationId}-<storeName>-outer-this-join and ${applicationId}-<storeName>-outer-other-join depending if the join is an inner-join or an outer join. The changelog topics will have the -changelog suffix. The user should note that even though the join stores will have a specified name, the stores will remain unavailable for querying.- Parameters:
- storeName- the storeName to use
- Returns:
- a new StreamJoinedinstance
 
- 
withKeySerdeConfigure with the providedSerdefor the key- Parameters:
- keySerde- the serde to use for the key
- Returns:
- a new StreamJoinedconfigured with the keySerde
 
- 
withValueSerdeConfigure with the providedSerdefor this value- Parameters:
- valueSerde- the serde to use for this value (calling or left side of the join)
- Returns:
- a new StreamJoinedconfigured with the valueSerde
 
- 
withOtherValueSerdeConfigure with the providedSerdefor the other value- Parameters:
- otherValueSerde- the serde to use for the other value (other or right side of the join)
- Returns:
- a new StreamJoinedconfigured with the otherValueSerde
 
- 
withThisStoreSupplierConfigure with the providedWindowBytesStoreSupplierfor this store supplier. Please note this method only provides the store supplier for the left side of the join. If you wish to also provide a store supplier for the right (i.e., other) side you must use thewithOtherStoreSupplier(WindowBytesStoreSupplier)method- Parameters:
- thisStoreSupplier- the store supplier to use for this store supplier (calling or left side of the join)
- Returns:
- a new StreamJoinedconfigured with thisStoreSupplier
 
- 
withOtherStoreSupplierConfigure with the providedWindowBytesStoreSupplierfor the other store supplier. Please note this method only provides the store supplier for the right side of the join. If you wish to also provide a store supplier for the left side you must use thewithThisStoreSupplier(WindowBytesStoreSupplier)method- Parameters:
- otherStoreSupplier- the store supplier to use for the other store supplier (other or right side of the join)
- Returns:
- a new StreamJoinedconfigured with otherStoreSupplier
 
- 
withLoggingEnabledConfigures logging for both state stores. The changelog will be created with the provided configs.Note: Any unrecognized configs will be ignored - Parameters:
- config- configs applied to the changelog topic
- Returns:
- a new StreamJoinedconfigured with logging enabled
 
- 
withLoggingDisabledDisable change logging for both state stores.- Returns:
- a new StreamJoinedconfigured with logging disabled
 
- 
toString
 
-