K
- the type of the join keyE0
- the type of the left-hand stream itemE1
- the type of the right-hand stream itemE1_OUT
- the result type of the right-hand projection functionpublic final class JoinClause<K,E0,E1,E1_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 vaules. In this case the projection function should be
Entry::getValue
. There is direct support for this case with the
method joinMapEntries(DistributedFunction)
.Modifier and Type | Method and Description |
---|---|
static <K,E0,E1_IN extends Map.Entry<K,E1>,E1> |
joinMapEntries(DistributedFunction<E0,K> leftKeyFn)
A shorthand factory for the common case of hash-joining with a stream of
map entries.
|
DistributedFunction<E0,K> |
leftKeyFn()
Returns the left-hand key extractor function.
|
static <K,E0,E1> JoinClause<K,E0,E1,E1> |
onKeys(DistributedFunction<E0,K> leftKeyFn,
DistributedFunction<E1,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.
|
<E1_NEW_OUT> |
projecting(DistributedFunction<E1,E1_NEW_OUT> rightProjectFn)
Returns a copy of this join clause, but with the right-hand projection
function replaced with the supplied one.
|
DistributedFunction<E1,K> |
rightKeyFn()
Returns the right-hand key extractor function.
|
DistributedFunction<E1,E1_OUT> |
rightProjectFn()
Returns the right-hand projection function.
|
public static <K,E0,E1> JoinClause<K,E0,E1,E1> onKeys(DistributedFunction<E0,K> leftKeyFn, DistributedFunction<E1,K> rightKeyFn)
public static <K,E0,E1_IN extends Map.Entry<K,E1>,E1> JoinClause<K,E0,E1_IN,E1> joinMapEntries(DistributedFunction<E0,K> leftKeyFn)
Map.Entry::getKey
and the
right-hand projection function is Map.Entry::getValue
.K
- the type of the keyE0
- the type of the primary streamE1
- the type of the enriching stream's entry valueE1_IN
- the type of the enriching stream (Map.Entry<K, E1>
)leftKeyFn
- the function to extract the key from the primary streampublic <E1_NEW_OUT> JoinClause<K,E0,E1,E1_NEW_OUT> projecting(DistributedFunction<E1,E1_NEW_OUT> rightProjectFn)
public DistributedFunction<E0,K> leftKeyFn()
public DistributedFunction<E1,K> rightKeyFn()
public DistributedFunction<E1,E1_OUT> rightProjectFn()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.