Package net.sf.okapi.common.pipeline
Interface IWorkQueueStep<T>
-
- Type Parameters:
T- - return type ofICallableStep, i.e. Event, SortableEvent
- All Superinterfaces:
AutoCloseable,Function<Stream<Event>,Stream<Event>>,IPipelineStep
public interface IWorkQueueStep<T> extends IPipelineStep
Step that can process multiple events concurrently.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LinkedList<ICallableStep<T>>getCallableSteps()Gets the list ofICallableStepbased on the main or template step.IPipelineStepgetMainStep()Gets the main step wrapped by IWorkQueueStepintgetWorkQueueCount()Get the number of work queues defined for this stepvoidinit()Used when the empty constructor is calledvoidsetMainStep(IPipelineStep step)Sets the main (template for all callabale steps) pipeline step MUST BE CALLED BEFORE init()voidsetWorkQueueCount(int workQueueCount)Set the work queue count MUST BE CALLED BEFORE init()-
Methods inherited from interface net.sf.okapi.common.pipeline.IPipelineStep
apply, cancel, close, destroy, getDescription, getHelpLocation, getName, getParameters, getSourceLocale, getTargetLocale, handleEvent, handleStream, isDone, isLastOutputStep, setLastOutputStep, setParameters, setSourceLocale, setTargetLocale
-
-
-
-
Method Detail
-
getMainStep
IPipelineStep getMainStep()
Gets the main step wrapped by IWorkQueueStep- Returns:
- the main step used as template by
ICallableStepsteps
-
getCallableSteps
LinkedList<ICallableStep<T>> getCallableSteps()
Gets the list ofICallableStepbased on the main or template step.- Returns:
- the
ICallableStepsteps
-
getWorkQueueCount
int getWorkQueueCount()
Get the number of work queues defined for this step- Returns:
- the number of work queue
-
init
void init() throws InstantiationException, IllegalAccessException
Used when the empty constructor is called- Throws:
InstantiationException- when we fail to create an instance..IllegalAccessException- when trying to create an instance but don't have the right.
-
setMainStep
void setMainStep(IPipelineStep step)
Sets the main (template for all callabale steps) pipeline step MUST BE CALLED BEFORE init()- Parameters:
step- - the main step
-
setWorkQueueCount
void setWorkQueueCount(int workQueueCount)
Set the work queue count MUST BE CALLED BEFORE init()- Parameters:
workQueueCount- - the number of step work queues
-
-