K
- the type of the join keyT0
- the type of the left-hand stream itemT1
- the type of the right-hand stream itemT1_OUT
- the result type of the right-hand projection functionpublic final class JoinClause<K,T0,T1,T1_OUT> extends Object implements Serializable
hash-join
operation. It holds three
primitives:
Sources.map(java.lang.String)
. The enriching stream consists
of map entries, but the result should contain just the values. In this
case the projection function should be Entry::getValue
. There is
direct support for this case with the method joinMapEntries(FunctionEx)
.Modifier and Type | Method and Description |
---|---|
static <K,T0,T1_OUT> |
joinMapEntries(FunctionEx<? super T0,? extends K> leftKeyFn)
A shorthand factory for the common case of hash-joining with a stream of
map entries.
|
FunctionEx<? super T0,? extends K> |
leftKeyFn()
Returns the left-hand key extractor function.
|
static <K,T0,T1> JoinClause<K,T0,T1,T1> |
onKeys(FunctionEx<? super T0,? extends K> leftKeyFn,
FunctionEx<? super T1,? extends K> rightKeyFn)
Constructs and returns a join clause with the supplied left-hand and
right-hand key extractor functions, and with an identity right-hand
projection function.
|
<T1_NEW_OUT> |
projecting(FunctionEx<? super T1,? extends T1_NEW_OUT> rightProjectFn)
Returns a copy of this join clause, but with the right-hand projection
function replaced with the supplied one.
|
FunctionEx<? super T1,? extends K> |
rightKeyFn()
Returns the right-hand key extractor function.
|
FunctionEx<? super T1,? extends T1_OUT> |
rightProjectFn()
Returns the right-hand projection function.
|
public static <K,T0,T1> JoinClause<K,T0,T1,T1> onKeys(FunctionEx<? super T0,? extends K> leftKeyFn, FunctionEx<? super T1,? extends K> rightKeyFn)
The given functions must be stateless and cooperative.
public static <K,T0,T1_OUT> JoinClause<K,T0,Map.Entry<K,T1_OUT>,T1_OUT> joinMapEntries(FunctionEx<? super T0,? extends K> leftKeyFn)
Map.Entry::getKey
and the
right-hand projection function is Map.Entry::getValue
.K
- the type of the keyT0
- the type of the primary streamT1_OUT
- the type of the enriching stream's entry valueleftKeyFn
- the function to extract the key from the primary
stream. It must be stateless and cooperative.public <T1_NEW_OUT> JoinClause<K,T0,T1,T1_NEW_OUT> projecting(FunctionEx<? super T1,? extends T1_NEW_OUT> rightProjectFn)
The given function must be stateless and cooperative.
public FunctionEx<? super T0,? extends K> leftKeyFn()
public FunctionEx<? super T1,? extends K> rightKeyFn()
public FunctionEx<? super T1,? extends T1_OUT> rightProjectFn()
Copyright © 2024 Hazelcast, Inc.. All rights reserved.