J - the type of the jobs to be submitted and processedpublic class DelegatingInputProcessor<J> extends Object implements InputProcessor<J>
| Constructor and Description |
|---|
DelegatingInputProcessor(InputProcessor<J> p) |
| Modifier and Type | Method and Description |
|---|---|
void |
finish()
Indicate that processing is finished.
|
protected void |
postProcess() |
protected void |
postSubmit(J job) |
protected void |
preProcess() |
protected void |
preSubmit(J job) |
void |
process()
Performs processing using this
Processor. |
void |
submit(J job)
Submit a job to be processed by this
Processor. |
public DelegatingInputProcessor(InputProcessor<J> p)
public void submit(J job)
InputProcessorProcessor. This method can
never fail or be interrupted. It is guaranteed that the submitted job is
processed when all subsequent calls of Processor.process() terminate.submit in interface InputProcessor<J>job - the job to be submittedpublic void process()
throws InterruptedException
ProcessorProcessor. For each
Processor object the method should be called only from one
thread, but several Processor objects can call this method
concurrently. In this case, processing performs concurrently and is
finished when all concurrent calls of Processor.process() are finished.process in interface ProcessorInterruptedException - if interrupted during processingpublic void finish()
ProcessorProcessor.process(). But
it is not necessary that every call of Processor.process() should be
followed by Processor.finish(). E.g., it can be followed by
Processor.process() when it is determined that processing is not yet
finished (e.g., due to concurrent computation).protected void preSubmit(J job)
protected void postSubmit(J job)
protected void preProcess()
protected void postProcess()
Copyright © 2011–2024 Live Ontologies Project. All rights reserved.