edu.stanford.nlp.util.concurrent
Interface ThreadsafeProcessor<I,O>

Type Parameters:
I - input type
O - output type

public interface ThreadsafeProcessor<I,O>

Objects that wish to use MulticoreWrapper for multicore support must implement this interface. Objects that implement this interface should, of course, be threadsafe.

Author:
Spence Green

Method Summary
 ThreadsafeProcessor<I,O> newInstance()
          Return a new threadsafe instance.
 O process(I input)
          Set the input item that will be processed when a thread is allocated to this processor.
 

Method Detail

process

O process(I input)
Set the input item that will be processed when a thread is allocated to this processor.

Parameters:
input - the object to be processed
Returns:
the result of the processing

newInstance

ThreadsafeProcessor<I,O> newInstance()
Return a new threadsafe instance.



Stanford NLP Group