Package org.redisson.mapreduce
Class RedissonMapReduce<KIn,VIn,KOut,VOut>
-
- org.redisson.mapreduce.RedissonMapReduce<KIn,VIn,KOut,VOut>
-
- Type Parameters:
KIn
- input key typeVIn
- input value typeKOut
- output key typeVOut
- output value type
- All Implemented Interfaces:
RMapReduce<KIn,VIn,KOut,VOut>
,RMapReduceExecutor<VIn,KOut,VOut>
public class RedissonMapReduce<KIn,VIn,KOut,VOut> extends implements RMapReduce<KIn,VIn,KOut,VOut>
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description RedissonMapReduce(RObject object, RedissonClient redisson, CommandAsyncExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
task)
protected <>
resultMapName, > collator)
<KOut,VOut>
execute()
Executes MapReduce process across Redisson Nodesvoid
resultMapName)
Executes MapReduce process across Redisson Nodes and stores result in map withresultMapName
<R> R
execute(RCollator<KOut,VOut,R> collator)
Executes MapReduce process across Redisson Nodes and collides result using definedcollator
<KOut,VOut>>
executeAsync()
Executes MapReduce process across Redisson Nodes in asynchronous mode>
resultMapName)
Executes MapReduce process across Redisson Nodes in asynchronous mode and stores result in map withresultMapName
<R> RFuture<R>
executeAsync(RCollator<KOut,VOut,R> collator)
Executes MapReduce process across Redisson Nodes in asynchronous mode and collides result using definedcollator
RMapReduce<KIn,VIn,KOut,VOut>
mapper(RMapper<KIn,VIn,KOut,VOut> mapper)
Setup Mapper objectRMapReduce<KIn,VIn,KOut,VOut>
reducer(RReducer<KOut,VOut> reducer)
Setup Reducer objectRMapReduce<KIn,VIn,KOut,VOut>
timeout(long timeout, unit)
Defines timeout for MapReduce process.-
Methods inherited from interface org.redisson.api.mapreduce.RMapReduceExecutor
execute, execute, execute, executeAsync, executeAsync, executeAsync
-
-
-
-
Constructor Detail
-
RedissonMapReduce
public RedissonMapReduce(RObject object, RedissonClient redisson, CommandAsyncExecutor commandExecutor)
-
-
Method Detail
-
timeout
public RMapReduce<KIn,VIn,KOut,VOut> timeout(long timeout, unit)
Description copied from interface:RMapReduce
Defines timeout for MapReduce process.0
means infinity timeout.
-
mapper
public RMapReduce<KIn,VIn,KOut,VOut> mapper(RMapper<KIn,VIn,KOut,VOut> mapper)
Description copied from interface:RMapReduce
Setup Mapper object
-
reducer
public RMapReduce<KIn,VIn,KOut,VOut> reducer(RReducer<KOut,VOut> reducer)
Description copied from interface:RMapReduce
Setup Reducer object
-
createTask
protected <> createTask( resultMapName, > collator)
-
check
protected void check( task)
-
execute
public <KOut,VOut> execute()
Description copied from interface:RMapReduceExecutor
Executes MapReduce process across Redisson Nodes- Specified by:
execute
in interfaceRMapReduceExecutor<M,VIn,KOut>
- Returns:
- map containing reduced keys and values
-
executeAsync
public <KOut,VOut>> executeAsync()
Description copied from interface:RMapReduceExecutor
Executes MapReduce process across Redisson Nodes in asynchronous mode- Specified by:
executeAsync
in interfaceRMapReduceExecutor<M,VIn,KOut>
- Returns:
- map containing reduced keys and values
-
execute
public void execute( resultMapName)
Description copied from interface:RMapReduceExecutor
Executes MapReduce process across Redisson Nodes and stores result in map withresultMapName
- Specified by:
execute
in interfaceRMapReduceExecutor<M,VIn,KOut>
- Parameters:
resultMapName
- - destination map name
-
executeAsync
public > executeAsync( resultMapName)
Description copied from interface:RMapReduceExecutor
Executes MapReduce process across Redisson Nodes in asynchronous mode and stores result in map withresultMapName
- Specified by:
executeAsync
in interfaceRMapReduceExecutor<M,VIn,KOut>
- Parameters:
resultMapName
- - destination map name- Returns:
- void
-
execute
public <R> R execute(RCollator<KOut,VOut,R> collator)
Description copied from interface:RMapReduceExecutor
Executes MapReduce process across Redisson Nodes and collides result using definedcollator
- Specified by:
execute
in interfaceRMapReduceExecutor<M,VIn,KOut>
- Type Parameters:
R
- result type- Parameters:
collator
- applied to result- Returns:
- collated result
-
executeAsync
public <R> RFuture<R> executeAsync(RCollator<KOut,VOut,R> collator)
Description copied from interface:RMapReduceExecutor
Executes MapReduce process across Redisson Nodes in asynchronous mode and collides result using definedcollator
- Specified by:
executeAsync
in interfaceRMapReduceExecutor<M,VIn,KOut>
- Type Parameters:
R
- result type- Parameters:
collator
- applied to result- Returns:
- collated result
-
-