cascading.operation
Interface Operation<C>

All Known Subinterfaces:
Aggregator<C>, Assertion<PC>, Buffer<C>, Filter<C>, Function<C>, GroupAssertion<C>, ValueAssertion<C>
All Known Implementing Classes:
And, AssertEquals, AssertEqualsAll, AssertExpression, AssertGroupBase, AssertGroupSizeEquals, AssertGroupSizeLessThan, AssertGroupSizeMoreThan, AssertMatches, AssertMatchesAll, AssertNotNull, AssertNull, AssertSizeEquals, AssertSizeLessThan, AssertSizeMoreThan, Average, BaseAssertion, BaseOperation, Count, DateFormatter, DateOperation, DateParser, Debug, ExpressionFilter, ExpressionFunction, ExpressionOperation, ExtentBase, ExtremaBase, FieldFormatter, FieldJoiner, FilterNotNull, FilterNull, First, Identity, Insert, Last, Limit, Logic, Max, Min, Not, Or, RegexFilter, RegexGenerator, RegexMatcher, RegexOperation, RegexParser, RegexReplace, RegexSplitGenerator, RegexSplitter, Sample, Sum, TagSoupParser, UnGroup, Xor, XPathFilter, XPathGenerator, XPathOperation, XPathParser

public interface Operation<C>

Interface Operation is the base interface for all functions applied to Tuple streams.

Specificlly Function, Filter, Aggregator, Buffer, and Assertion.

Use BaseOperation for a convenient way to create new Operation types.

See Also:
BaseOperation, Function, Filter, Aggregator, Buffer, Assertion

Field Summary
static int ANY
          Field ANY denotes that a given Operation will take any number of argument values
 
Method Summary
 void cleanup(FlowProcess flowProcess, OperationCall<C> operationCall)
          The cleanup method is called immediately after the current Operation instance is taken out of play.
 Fields getFieldDeclaration()
          Returns the fields created by this Operation instance.
 int getNumArgs()
          The minimum number of arguments this Operation expects from the calling Each or Every Operator.
 void prepare(FlowProcess flowProcess, OperationCall<C> operationCall)
          The prepare method is called immediately before the current Operation instance is put into play.
 

Field Detail

ANY

static final int ANY
Field ANY denotes that a given Operation will take any number of argument values

See Also:
Constant Field Values
Method Detail

prepare

void prepare(FlowProcess flowProcess,
             OperationCall<C> operationCall)
The prepare method is called immediately before the current Operation instance is put into play. This method should initialize any resources that can be shutdown or released in the cleanup(cascading.flow.FlowProcess, OperationCall) method.

This method may be called more than once during the life of this instance. But it will never be called multiple times without a cleanup invocation immediately before subsequent invocations.

Parameters:
flowProcess -
operationCall -

cleanup

void cleanup(FlowProcess flowProcess,
             OperationCall<C> operationCall)
The cleanup method is called immediately after the current Operation instance is taken out of play. This method should shutdown any resources created or initialized during the prepare(cascading.flow.FlowProcess, OperationCall) method.

This method may be called more than once during the life of this instance. But it will never be called multiple times without a prepare invocation before.

Parameters:
flowProcess -
operationCall -

getFieldDeclaration

Fields getFieldDeclaration()
Returns the fields created by this Operation instance. If this instance is a Filter, it should always return Fields.ALL.

Returns:

getNumArgs

int getNumArgs()
The minimum number of arguments this Operation expects from the calling Each or Every Operator.

Operations should be willing to receive more arguments than expected, but should ignore them if they are unused, instead of failing.

Returns:
an int


Copyright © 2007-2008 Concurrent, Inc. All Rights Reserved.