cascading.operation.filter
Class Limit
java.lang.Object
cascading.operation.BaseOperation<Limit.Context>
cascading.operation.filter.Limit
- All Implemented Interfaces:
- Filter<Limit.Context>, Operation<Limit.Context>, Serializable
public class Limit
- extends BaseOperation<Limit.Context>
- implements Filter<Limit.Context>
Class Limit is a Filter that will limit the number of Tuple instances that it will
allow to pass.
- See Also:
Sample,
Serialized Form
| Fields inherited from interface cascading.operation.Operation |
ANY |
|
Constructor Summary |
Limit(long limit)
Creates a new Limit class that only allows limit number of Tuple instances to pass. |
Limit
public Limit(long limit)
- Creates a new Limit class that only allows limit number of Tuple instances to pass.
- Parameters:
limit - the number of tuples to let pass
prepare
public void prepare(FlowProcess flowProcess,
OperationCall<Limit.Context> operationCall)
- Description copied from class:
BaseOperation
- Method prepare does nothing, and may safely be overridden.
- Specified by:
prepare in interface Operation<Limit.Context>- Overrides:
prepare in class BaseOperation<Limit.Context>
isRemove
public boolean isRemove(FlowProcess flowProcess,
FilterCall<Limit.Context> filterCall)
- Description copied from interface:
Filter
- Method isRemove returns true if input should be removed from the tuple stream.
- Specified by:
isRemove in interface Filter<Limit.Context>
- Parameters:
flowProcess - of type FlowProcessfilterCall - of type FilterCall
- Returns:
- boolean
Copyright © 2007-2009 Concurrent, Inc. All Rights Reserved.