Class PersistValueAction
- java.lang.Object
-
- com.arassec.igor.core.model.BaseIgorComponent
-
- com.arassec.igor.core.model.action.BaseAction
-
- com.arassec.igor.module.misc.action.persistence.BasePersistenceAction
-
- com.arassec.igor.module.misc.action.persistence.PersistValueAction
-
- All Implemented Interfaces:
Action,IgorComponent
public class PersistValueAction extends BasePersistenceAction
Persists a value from the supplied data to the persistence store.
-
-
Field Summary
-
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 PersistValueAction(PersistentValueRepository persistentValueRepository)Creates a new 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)Takes the value from the supplied data and saves it to the persistence store.voidshutdown(String jobId, JobExecution jobExecution)Cleans up the persisted values and keep only thenumValuesToKeepmost recent values in the store.-
Methods inherited from class com.arassec.igor.core.model.action.BaseAction
clone, complete, getJobId, getName, getNumThreads, getString, isActive, isSimulation, reset, setActive, setName, setNumThreads
-
Methods inherited from class com.arassec.igor.core.model.BaseIgorComponent
getCategoryId, getId, getTypeId, getUnEditableProperties, initialize, setId
-
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
-
-
-
-
Constructor Detail
-
PersistValueAction
public PersistValueAction(PersistentValueRepository persistentValueRepository)
Creates a new instance.- Parameters:
persistentValueRepository- The repository for persisted values.
-
-
Method Detail
-
process
public List<Map<String,Object>> process(Map<String,Object> data, JobExecution jobExecution)
Takes the value from the supplied data and saves it to the persistence store.- Parameters:
data- The data the action will work with.jobExecution- The job execution log.- Returns:
- Always
true.
-
shutdown
public void shutdown(String jobId, JobExecution jobExecution)
Cleans up the persisted values and keep only thenumValuesToKeepmost recent values in the store.- Specified by:
shutdownin interfaceIgorComponent- Overrides:
shutdownin classBaseIgorComponent- Parameters:
jobId- The job's ID.jobExecution- The container for job execution details.
-
-