Class OperationContextImpl
java.lang.Object
uk.ac.diamond.scisoft.analysis.processing.OperationContextImpl
- All Implemented Interfaces:
IOperationContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.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.SliceNDinthashCode()voidsetData(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 parallelTimeout) Optionally configure the parallel timeout of this service.voidsetPoolSize(int slugCount) 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)
-
Constructor Details
-
OperationContextImpl
public OperationContextImpl()
-
-
Method Details
-
getSeries
- Specified by:
getSeriesin interfaceIOperationContext- Returns:
- the pipeline
-
setSeries
Description copied from interface:IOperationContextSet the pipeline, must be non-null.- Specified by:
setSeriesin interfaceIOperationContext- Parameters:
series-
-
setSeries
Description copied from interface:IOperationContextSet the pipeline, must be non-null.- Specified by:
setSeriesin interfaceIOperationContext- Parameters:
series-
-
getData
- Specified by:
getDatain interfaceIOperationContext- Returns:
- The data which we are slicing
- Throws:
Exception
-
setData
public void setData(org.eclipse.january.dataset.ILazyDataset data) Description copied from interface:IOperationContextThe data which we are slicing- Specified by:
setDatain interfaceIOperationContext
-
getSlicing
public org.eclipse.january.dataset.SliceND getSlicing()- Specified by:
getSlicingin interfaceIOperationContext- Returns:
- A map of data dimension to String representing the slice done on this dimension.
-
setSlicing
public void setSlicing(org.eclipse.january.dataset.SliceND slicing) Description copied from interface:IOperationContextA map of data dimension to String representing the slice done on this dimension.- Specified by:
setSlicingin interfaceIOperationContext
-
getMonitor
public org.eclipse.january.IMonitor getMonitor()- Specified by:
getMonitorin interfaceIOperationContext- Returns:
- monitor or null
-
setMonitor
public void setMonitor(org.eclipse.january.IMonitor monitor) - Specified by:
setMonitorin interfaceIOperationContext- Parameters:
monitor-
-
getVisitor
- Specified by:
getVisitorin interfaceIOperationContext- Returns:
- vistor or null
-
setVisitor
- Specified by:
setVisitorin interfaceIOperationContext- Parameters:
visitor-
-
hashCode
public int hashCode() -
equals
-
getExecutionType
- Specified by:
getExecutionTypein interfaceIOperationContext- Returns:
- execution type.
-
setExecutionType
Description copied from interface:IOperationContextSets 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- Specified by:
setExecutionTypein interfaceIOperationContext- Parameters:
executionType-
-
getNumberOfCores
public int getNumberOfCores()- Specified by:
getNumberOfCoresin interfaceIOperationContext- Returns:
- number of cores.
-
setNumberOfCores
public void setNumberOfCores(int numberOfCores) Description copied from interface:IOperationContextSets the number of CPU cores to use. Must be set after setting the execution type- Specified by:
setNumberOfCoresin interfaceIOperationContext- Parameters:
numberOfCores-
-
getParallelTimeout
public long getParallelTimeout()Description copied from interface:IOperationContextTimeout in parallel mode.- Specified by:
getParallelTimeoutin interfaceIOperationContext- Returns:
- timeout
-
setParallelTimeout
public void setParallelTimeout(long parallelTimeout) Description copied from interface:IOperationContextOptionally configure the parallel timeout of this service.- Specified by:
setParallelTimeoutin interfaceIOperationContext- Parameters:
parallelTimeout-
-
getFilePath
Description copied from interface:IOperationContextPath to data file- Specified by:
getFilePathin interfaceIOperationContext
-
setFilePath
Description copied from interface:IOperationContextPath to data file- Specified by:
setFilePathin interfaceIOperationContext- Parameters:
filePath-
-
getDatasetPath
Description copied from interface:IOperationContextPath to dataset- Specified by:
getDatasetPathin interfaceIOperationContext- Returns:
- path
-
setDatasetPath
Description copied from interface:IOperationContextPath to dataset- Specified by:
setDatasetPathin interfaceIOperationContext- Parameters:
datasetPath-
-
getPoolSize
public int getPoolSize()Description copied from interface:IOperationContextThe number of threads in the pool to execute the pipeline as an event directory pipeline. return the count- Specified by:
getPoolSizein interfaceIOperationContext
-
setPoolSize
public void setPoolSize(int slugCount) Description copied from interface:IOperationContextThe 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- Specified by:
setPoolSizein interfaceIOperationContext
-
getDataDimensions
public int[] getDataDimensions()- Specified by:
getDataDimensionsin interfaceIOperationContext
-
setDataDimensions
public void setDataDimensions(int[] dataDimensions) - Specified by:
setDataDimensionsin interfaceIOperationContext
-
setLiveInfo
- Specified by:
setLiveInfoin interfaceIOperationContext
-
getLiveInfo
- Specified by:
getLiveInfoin interfaceIOperationContext
-