protected abstract static class MapReduce.Builder<T extends MapReduce.Builder<T>> extends Object
Modifier and Type | Field and Description |
---|---|
protected List<MapReducePhase> |
phases |
protected Long |
timeout |
Modifier | Constructor and Description |
---|---|
protected |
MapReduce.Builder() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
self() |
T |
timeout(long timeout)
Set the operations timeout
|
T |
withLinkPhase(String bucket,
String tag)
Create a Link Phase that points to
bucket / tag keep will be
false |
T |
withLinkPhase(String bucket,
String tag,
boolean keep)
Add a Link Phase that points to
bucket / tag . |
T |
withMapPhase(Function phaseFunction)
Add a MapPhase
|
T |
withMapPhase(Function phaseFunction,
boolean keep)
Add
MapPhase to the query |
T |
withMapPhase(Function phaseFunction,
Object arg)
Add a MapPhase
|
T |
withMapPhase(Function phaseFunction,
Object arg,
boolean keep)
Add a MapPhase
|
T |
withReducePhase(Function phaseFunction)
Add a
ReducePhase |
T |
withReducePhase(Function phaseFunction,
boolean keep)
Add
ReducePhase to the query |
T |
withReducePhase(Function phaseFunction,
Object arg)
Add a
ReducePhase |
T |
withReducePhase(Function phaseFunction,
Object arg,
boolean keep)
Add a
ReducePhase |
protected final List<MapReducePhase> phases
protected Long timeout
public T timeout(long timeout)
timeout
- public T withMapPhase(Function phaseFunction, boolean keep)
MapPhase
to the queryphaseFunction
- the Function
keep
- keep the results and return them with the query results?public T withMapPhase(Function phaseFunction, Object arg, boolean keep)
phaseFunction
- the Function
arg
- an argument that will be passed to the phase verbatim (Object#toString)keep
- if the result should be returned or merely provide input for the next phase.public T withMapPhase(Function phaseFunction, Object arg)
phaseFunction
- the Function
arg
- an argument that will be passed to the phase verbatim (Object#toString)public T withMapPhase(Function phaseFunction)
phaseFunction
- the Function
public T withReducePhase(Function phaseFunction, boolean keep)
ReducePhase
to the queryphaseFunction
- the Function
keep
- keep the results and return them with the query results?public T withReducePhase(Function phaseFunction, Object arg, boolean keep)
ReducePhase
phaseFunction
- the Function
arg
- an argument that will be passed to the phase verbatim (Object#toString)keep
- if the result should be returned or merely provide input for the next phase.public T withReducePhase(Function phaseFunction, Object arg)
ReducePhase
phaseFunction
- the Function
arg
- an argument that will be passed to the phase verbatimpublic T withReducePhase(Function phaseFunction)
ReducePhase
phaseFunction
- public T withLinkPhase(String bucket, String tag, boolean keep)
bucket
/ tag
.bucket
- the bucket at the end of the link (or "_" or "" for wildcard)tag
- the tag (or ("_", or "" for wildcard)keep
- to keep the result of this phase and return it at the end of the operationpublic T withLinkPhase(String bucket, String tag)
bucket
/ tag
keep
will be
false
bucket
- the bucket at the end of the link (or "_" or "" for wildcard)tag
- the tag (or ("_", or "" for wildcard)protected abstract T self()
Copyright © 2014. All rights reserved.