|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.processing.worker.ProcessingWorker
public abstract class ProcessingWorker
Common stuff for PipeletProcessorWorker and PipelineProcessorWorker.
| Field Summary | |
|---|---|
protected boolean |
_binStorageAvailable
use bin storage? |
protected BlackboardFactory |
_blackboardFactory
blackboard factory. |
protected Log |
_log
protected log. |
static java.lang.String |
INPUT_SLOT_NAME
the workers input slot name . |
static java.lang.String |
KEY_KEEPATTACHMENTSINMEMORY
name for "keep attachments in memory" parameter. |
static java.lang.String |
KEY_WRITEATTACHMENTSTOOUTPUT
name for "write attachments to output" parameter. |
static java.lang.String |
OUTPUT_SLOT_NAME
the workers output slot name . |
protected static boolean |
s_noBinStorageAvailableLogged
flag if the blackboard warning has already been logged to prevent excessive logging. |
| Constructor Summary | |
|---|---|
ProcessingWorker()
|
|
| Method Summary | |
|---|---|
protected void |
cleanupBlackboard(Blackboard blackboard,
TaskContext taskContext)
|
protected Blackboard |
getBlackboard(TaskContext taskContext)
Creates the blackboard to hold the records during processing |
abstract boolean |
perform(AnyMap parameters,
RecordInput recordInput,
RecordOutput recordOutput,
TaskContext taskContext)
|
void |
perform(TaskContext taskContext)
Performs a computation on the data available in the TaskContext, such as a task for this worker, input and
(if configured) output slots. |
void |
setBlackboardFactory(BlackboardFactory factory)
set blackboard factory reference (used by DS). |
void |
unsetBlackboardFactory(BlackboardFactory factory)
remove blackboard factory reference (used by DS). |
protected void |
writeResultRecords(Blackboard blackboard,
java.lang.String[] resultIds,
RecordOutput recordOutput,
TaskContext taskContext)
append the resulting records to the bulk. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.smila.taskworker.Worker |
|---|
getName |
| Field Detail |
|---|
public static final java.lang.String INPUT_SLOT_NAME
public static final java.lang.String OUTPUT_SLOT_NAME
public static final java.lang.String KEY_KEEPATTACHMENTSINMEMORY
public static final java.lang.String KEY_WRITEATTACHMENTSTOOUTPUT
protected static boolean s_noBinStorageAvailableLogged
protected final Log _log
protected BlackboardFactory _blackboardFactory
protected boolean _binStorageAvailable
| Constructor Detail |
|---|
public ProcessingWorker()
| Method Detail |
|---|
public abstract boolean perform(AnyMap parameters,
RecordInput recordInput,
RecordOutput recordOutput,
TaskContext taskContext)
throws java.lang.Exception
parameters - task parameters, converted to an AnyMaprecordInput - input bulkrecordOutput - output bulk, can be nulltaskContext - task context
java.lang.Exception - bulk could not be processed
public void perform(TaskContext taskContext)
throws java.lang.Exception
WorkerTaskContext, such as a task for this worker, input and
(if configured) output slots. An implementor must make sure, calls to this method must be thread-safe!
perform in interface WorkertaskContext - the TaskContext information with which this operation can be performed.
java.lang.Exception
protected void writeResultRecords(Blackboard blackboard,
java.lang.String[] resultIds,
RecordOutput recordOutput,
TaskContext taskContext)
throws ObjectStoreException,
java.io.IOException
recordOutput - where to write the records. Can be null (is optional in worker description)
ObjectStoreException
java.io.IOException
protected void cleanupBlackboard(Blackboard blackboard,
TaskContext taskContext)
protected Blackboard getBlackboard(TaskContext taskContext)
throws java.lang.Exception
java.lang.Exceptionpublic void setBlackboardFactory(BlackboardFactory factory)
public void unsetBlackboardFactory(BlackboardFactory factory)
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||