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 ofICallableStep
based on the main or template step.IPipelineStep
getMainStep()
Gets the main step wrapped by IWorkQueueStepint
getWorkQueueCount()
Get the number of work queues defined for this stepvoid
init()
Used when the empty constructor is calledvoid
setMainStep(IPipelineStep step)
Sets the main (template for all callabale steps) pipeline step MUST BE CALLED BEFORE init()void
setWorkQueueCount(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
ICallableStep
steps
-
getCallableSteps
LinkedList<ICallableStep<T>> getCallableSteps()
Gets the list ofICallableStep
based on the main or template step.- Returns:
- the
ICallableStep
steps
-
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
-
-