Node - public class SimpleNestedAggregate<Node> extends java.lang.Object implements NestedAggregate<Node,SimpleNestedAggregate.AggregateContext<Node>>
NestedAggregate.| Modifier and Type | Class and Description |
|---|---|
static interface |
SimpleNestedAggregate.AggregateContext<Node> |
| Modifier and Type | Field and Description |
|---|---|
protected cascading.operation.SerFunction<cascading.tuple.type.CoercibleType<Node>,SimpleNestedAggregate.AggregateContext<Node>> |
factory |
protected cascading.tuple.Fields |
fieldDeclaration |
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleNestedAggregate()
Create a new instance of SimpleNestedAggregate without a factory
|
protected |
SimpleNestedAggregate(cascading.tuple.Fields fieldDeclaration)
Create a new instance of SimpleNestedAggregate without a factory
|
|
SimpleNestedAggregate(cascading.tuple.Fields fieldDeclaration,
cascading.operation.SerFunction<cascading.tuple.type.CoercibleType<Node>,SimpleNestedAggregate.AggregateContext<Node>> factory)
Create a new instance of SimpleNestedAggregate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
aggregate(SimpleNestedAggregate.AggregateContext<Node> context,
Node node)
This method receives each collected value to be applied to the current aggregation.
|
cascading.tuple.Tuple |
complete(SimpleNestedAggregate.AggregateContext<Node> context)
This method completes the aggregate operation and insert the results into a Tuple instance.
|
SimpleNestedAggregate.AggregateContext<Node> |
createContext(cascading.tuple.type.CoercibleType<Node> nestedCoercibleType) |
cascading.tuple.Fields |
getFieldDeclaration() |
SimpleNestedAggregate.AggregateContext<Node> |
resetContext(SimpleNestedAggregate.AggregateContext<Node> context)
This method is called after
NestedAggregate.complete(Object) so that any resources can be freed and the result
context instance can be used in the next aggregation. |
protected void |
setFactory(cascading.operation.SerFunction<cascading.tuple.type.CoercibleType<Node>,SimpleNestedAggregate.AggregateContext<Node>> factory) |
protected SimpleNestedAggregate<Node> |
setFieldDeclaration(cascading.tuple.Fields fieldDeclaration) |
protected cascading.tuple.Fields fieldDeclaration
protected cascading.operation.SerFunction<cascading.tuple.type.CoercibleType<Node>,SimpleNestedAggregate.AggregateContext<Node>> factory
@ConstructorProperties(value={"fieldDeclaration","factory"})
public SimpleNestedAggregate(cascading.tuple.Fields fieldDeclaration,
cascading.operation.SerFunction<cascading.tuple.type.CoercibleType<Node>,SimpleNestedAggregate.AggregateContext<Node>> factory)
The factory parameter provides new instances of SimpleNestedAggregate.AggregateContext.
fieldDeclaration - the fields this aggregate returnsfactory - a supplier for new AggregateContext instances@ConstructorProperties(value="fieldDeclaration") protected SimpleNestedAggregate(cascading.tuple.Fields fieldDeclaration)
The factory parameter provides new instances of SimpleNestedAggregate.AggregateContext.
fieldDeclaration - the fields this aggregate returnsprotected SimpleNestedAggregate()
The factory parameter provides new instances of SimpleNestedAggregate.AggregateContext.
protected void setFactory(cascading.operation.SerFunction<cascading.tuple.type.CoercibleType<Node>,SimpleNestedAggregate.AggregateContext<Node>> factory)
public cascading.tuple.Fields getFieldDeclaration()
getFieldDeclaration in interface NestedAggregate<Node,SimpleNestedAggregate.AggregateContext<Node>>protected SimpleNestedAggregate<Node> setFieldDeclaration(cascading.tuple.Fields fieldDeclaration)
public SimpleNestedAggregate.AggregateContext<Node> createContext(cascading.tuple.type.CoercibleType<Node> nestedCoercibleType)
createContext in interface NestedAggregate<Node,SimpleNestedAggregate.AggregateContext<Node>>public void aggregate(SimpleNestedAggregate.AggregateContext<Node> context, Node node)
NestedAggregateaggregate in interface NestedAggregate<Node,SimpleNestedAggregate.AggregateContext<Node>>context - the context object created by NestedAggregate.createContext(CoercibleType)node - the Node container object that should be aggregatedpublic cascading.tuple.Tuple complete(SimpleNestedAggregate.AggregateContext<Node> context)
NestedAggregate
Note the Tuple may be created (indirectly) by the NestedAggregate.createContext(CoercibleType) method and reused.
complete in interface NestedAggregate<Node,SimpleNestedAggregate.AggregateContext<Node>>context - the context object created by NestedAggregate.createContext(CoercibleType)public SimpleNestedAggregate.AggregateContext<Node> resetContext(SimpleNestedAggregate.AggregateContext<Node> context)
NestedAggregateNestedAggregate.complete(Object) so that any resources can be freed and the result
context instance can be used in the next aggregation.resetContext in interface NestedAggregate<Node,SimpleNestedAggregate.AggregateContext<Node>>context - the context object created by NestedAggregate.createContext(CoercibleType)Copyright © 2007-2021 Cascading Maintainers. All Rights Reserved.