Interface IOperationContext
- All Known Implementing Classes:
OperationContextImpl
public interface IOperationContext
Essential things to set
1. Either:
a) an ILazyDataset (setData(..)) or [If the lazy dataset is there it takes precedence.]
b) the filePath and datasetPath
2. The slicing
4. The series to run
Optional
1. Execution type
2. Parallel timeout (default 5000ms) [series runs have no timeout]
3. Visitor
4. Monitor
Parallel Timeout Handling:
ExecutionType.GRAPH has 10 minutes applied when setExecutionType(...) is called, if parallelTimeout=-1
You can use setParallelTimeout(...) to change this.
-
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.january.dataset.ILazyDatasetgetData()int[]Path to datasetPath to data fileorg.eclipse.january.IMonitorintlongTimeout in parallel mode.intThe number of threads in the pool to execute the pipeline as an event directory pipeline.IOperation<? extends IOperationModel,? extends OperationData>[] org.eclipse.january.dataset.SliceNDvoidsetData(org.eclipse.january.dataset.ILazyDataset data) The data which we are slicingvoidsetDataDimensions(int[] dataDimensions) voidsetDatasetPath(String datasetPath) Path to datasetvoidsetExecutionType(ExecutionType executionType) Sets the execution type for operations.voidsetFilePath(String filePath) Path to data filevoidvoidsetMonitor(org.eclipse.january.IMonitor monitor) voidsetNumberOfCores(int numberOfCores) Sets the number of CPU cores to use.voidsetParallelTimeout(long timeoutMs) Optionally configure the parallel timeout of this service.voidsetPoolSize(int count) The number of images which may be queued in each actor.voidsetSeries(List<IOperation<? extends IOperationModel, ? extends OperationData>> series) Set the pipeline, must be non-null.voidsetSeries(IOperation<? extends IOperationModel, ? extends OperationData>... series) Set the pipeline, must be non-null.voidsetSlicing(org.eclipse.january.dataset.SliceND slicing) A map of data dimension to String representing the slice done on this dimension.voidsetVisitor(IExecutionVisitor visitor)
-
Method Details
-
getData
- Returns:
- The data which we are slicing
- Throws:
Exception
-
setData
void setData(org.eclipse.january.dataset.ILazyDataset data) The data which we are slicing -
getFilePath
String getFilePath()Path to data file -
setFilePath
Path to data file- Parameters:
filePath-
-
getDatasetPath
String getDatasetPath()Path to dataset- Returns:
- path
-
setDatasetPath
Path to dataset- Parameters:
datasetPath-
-
getSlicing
org.eclipse.january.dataset.SliceND getSlicing()- Returns:
- A map of data dimension to String representing the slice done on this dimension.
-
setSlicing
void setSlicing(org.eclipse.january.dataset.SliceND slicing) A map of data dimension to String representing the slice done on this dimension. -
getDataDimensions
int[] getDataDimensions() -
setDataDimensions
void setDataDimensions(int[] dataDimensions) -
getSeries
IOperation<? extends IOperationModel,? extends OperationData>[] getSeries()- Returns:
- the pipeline
-
setSeries
Set the pipeline, must be non-null.- Parameters:
series-
-
setSeries
Set the pipeline, must be non-null.- Parameters:
series-
-
getMonitor
org.eclipse.january.IMonitor getMonitor()- Returns:
- monitor or null
-
setMonitor
void setMonitor(org.eclipse.january.IMonitor monitor) - Parameters:
monitor-
-
getVisitor
IExecutionVisitor getVisitor()- Returns:
- vistor or null
-
setVisitor
- Parameters:
visitor-
-
getExecutionType
ExecutionType getExecutionType()- Returns:
- execution type.
-
setExecutionType
Sets the execution type for operations. If the ExecutionType is set to PARALLEL all processors seen by Runtime will be set as the number of available cores by default. If the number of CPU cores to be set is to be defined implicitly this must be done after setting the execution type- Parameters:
executionType-
-
getNumberOfCores
int getNumberOfCores()- Returns:
- number of cores.
-
setNumberOfCores
void setNumberOfCores(int numberOfCores) Sets the number of CPU cores to use. Must be set after setting the execution type- Parameters:
numberOfCores-
-
getParallelTimeout
long getParallelTimeout()Timeout in parallel mode.- Returns:
- timeout
-
setParallelTimeout
void setParallelTimeout(long timeoutMs) Optionally configure the parallel timeout of this service.- Parameters:
timeoutMs-
-
getPoolSize
int getPoolSize()The number of threads in the pool to execute the pipeline as an event directory pipeline. return the count -
setPoolSize
void setPoolSize(int count) The number of images which may be queued in each actor. By default the value is 1. Set it higher if you have the memory as bottle necks will be reduced. return the count -
setLiveInfo
-
getLiveInfo
ILiveOperationInfo getLiveInfo()
-