Class LimitAction
- java.lang.Object
-
- com.arassec.igor.core.model.BaseIgorComponent
-
- com.arassec.igor.core.model.action.BaseAction
-
- com.arassec.igor.module.misc.action.util.BaseUtilAction
-
- com.arassec.igor.module.misc.action.util.LimitAction
-
- All Implemented Interfaces:
Action,IgorComponent
public class LimitAction extends BaseUtilAction
Limits the data stream to the first 'n' data items.
-
-
Field Summary
-
Fields inherited from class com.arassec.igor.module.misc.action.util.BaseUtilAction
DEFAULT_TIME_UNIT, DEFAULT_TIMESTAMP_FORMAT
-
Fields inherited from class com.arassec.igor.core.model.action.BaseAction
active, numThreads
-
Fields inherited from class com.arassec.igor.core.model.BaseIgorComponent
id
-
-
Constructor Summary
Constructors Constructor Description LimitAction()Creates a new component instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Map<String,Object>>process(Map<String,Object> data, JobExecution jobExecution)Limits processing to the configured amount of data items.voidreset()Resets the action's counter so that the configured amount of data items is processed again.-
Methods inherited from class com.arassec.igor.core.model.action.BaseAction
clone, complete, getJobId, getJsonPathConfiguration, getName, getNumThreads, getString, isActive, isQuery, isSimulation, setActive, setJsonPathConfiguration, setName, setNumThreads
-
Methods inherited from class com.arassec.igor.core.model.BaseIgorComponent
getCategoryId, getId, getTypeId, getUnEditableProperties, initialize, setId, shutdown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.arassec.igor.core.model.IgorComponent
getCategoryId, getId, getTypeId, getUnEditableProperties, initialize, setId, shutdown
-
-
-
-
Method Detail
-
process
public List<Map<String,Object>> process(Map<String,Object> data, JobExecution jobExecution)
Limits processing to the configured amount of data items.- Parameters:
data- The data the action will work with.jobExecution- The job execution log.- Returns:
- Every data item until the first 'n' have been processed.
-
reset
public void reset()
Resets the action's counter so that the configured amount of data items is processed again.- Specified by:
resetin interfaceAction- Overrides:
resetin classBaseAction
-
-