public abstract class AssertGroupBase extends BaseAssertion<AssertGroupBase.Context> implements GroupAssertion<AssertGroupBase.Context>
Modifier and Type | Class and Description |
---|---|
static class |
AssertGroupBase.Context |
Modifier and Type | Field and Description |
---|---|
protected String |
patternString
Field patternString
|
protected long |
size
Field size
|
fieldDeclaration, numArgs, trace
Modifier | Constructor and Description |
---|---|
|
AssertGroupBase(String message,
long size) |
protected |
AssertGroupBase(String message,
String patternString,
long size) |
Modifier and Type | Method and Description |
---|---|
void |
aggregate(FlowProcess flowProcess,
GroupAssertionCall<AssertGroupBase.Context> assertionCall)
Method aggregate is called for each
TupleEntry value in the current grouping. |
protected abstract boolean |
assertFails(Long groupSize) |
void |
doAssert(FlowProcess flowProcess,
GroupAssertionCall<AssertGroupBase.Context> assertionCall)
Method doAssert performs the assertion.
|
boolean |
equals(Object object) |
String |
getPatternString() |
long |
getSize() |
int |
hashCode() |
void |
prepare(FlowProcess flowProcess,
OperationCall<AssertGroupBase.Context> operationCall)
Method prepare does nothing, and may safely be overridden.
|
void |
start(FlowProcess flowProcess,
GroupAssertionCall<AssertGroupBase.Context> assertionCall)
Method start initializes the aggregation procedure and is called for every unique grouping.
|
fail, fail, getMessage, supportsPlannerLevel, throwFail, throwFail
cleanup, flush, getFieldDeclaration, getNumArgs, getTrace, isSafe, printOperationInternal, toString, toStringInternal
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
supportsPlannerLevel
cleanup, flush, getFieldDeclaration, getNumArgs, isSafe
protected String patternString
protected final long size
@ConstructorProperties(value={"message","size"}) public AssertGroupBase(String message, long size)
@ConstructorProperties(value={"message","patternString","size"}) protected AssertGroupBase(String message, String patternString, long size)
public String getPatternString()
public long getSize()
public void prepare(FlowProcess flowProcess, OperationCall<AssertGroupBase.Context> operationCall)
BaseOperation
prepare
in interface Operation<AssertGroupBase.Context>
prepare
in class BaseOperation<AssertGroupBase.Context>
public void start(FlowProcess flowProcess, GroupAssertionCall<AssertGroupBase.Context> assertionCall)
GroupAssertion
GroupAssertion.aggregate(cascading.flow.FlowProcess, GroupAssertionCall)
call,
new HashMap() should be set on the AggregatorCall instance when OperationCall.getContext()
is null.
On the next grouping, start() will be called again, but this time with the old Map instance. In this case,
map.clear() should be invoked before returning.start
in interface GroupAssertion<AssertGroupBase.Context>
flowProcess
- of type FlowProcessassertionCall
- of type GroupAssertionCallpublic void aggregate(FlowProcess flowProcess, GroupAssertionCall<AssertGroupBase.Context> assertionCall)
GroupAssertion
TupleEntry
value in the current grouping.aggregate
in interface GroupAssertion<AssertGroupBase.Context>
flowProcess
- of type FlowProcessassertionCall
- of type GroupAssertionCallpublic void doAssert(FlowProcess flowProcess, GroupAssertionCall<AssertGroupBase.Context> assertionCall)
GroupAssertion
doAssert
in interface GroupAssertion<AssertGroupBase.Context>
flowProcess
- of type FlowProcessassertionCall
- of type GroupAssertionCallprotected abstract boolean assertFails(Long groupSize)
public boolean equals(Object object)
equals
in class BaseAssertion<AssertGroupBase.Context>
public int hashCode()
hashCode
in class BaseAssertion<AssertGroupBase.Context>
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.