|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.taskworker.io.IODataObjects
org.eclipse.smila.taskworker.input.Inputs
public class Inputs
Returned by TaskContext.getInputs() this class provides access to the data
objects associated by a task to the input slots of a worker. It can create different kinds of Input wrappers
on these data objects that make access for the workers easier. You can create only a single input wrapper for each
data object. On the second call, only null will be returned.
StreamInput,
RecordInput,
KvoInput| Constructor Summary | |
|---|---|
Inputs(java.util.Map<java.lang.String,java.util.List<BulkInfo>> dataObjects,
ObjectStoreService objectStore)
create instance. |
|
| Method Summary | ||
|---|---|---|
void |
addInputCounters(java.util.Map<java.lang.String,java.lang.Number> counters)
aggregate counters of input slots. |
|
void |
closeAll()
close all input wrapper objects. |
|
|
getAsInput(java.lang.String slotName,
java.lang.Class<T> inputClass)
Generic method to create input wrapper for the first data object in a slot. |
|
|
getAsInput(java.lang.String slotName,
int index,
java.lang.Class<T> inputClass)
Generic method to create input wrappers. |
|
RecordInput |
getAsRecordInput(java.lang.String slotName)
|
|
RecordInput |
getAsRecordInput(java.lang.String slotName,
int index)
|
|
StreamInput |
getAsStreamInput(java.lang.String slotName)
|
|
StreamInput |
getAsStreamInput(java.lang.String slotName,
int index)
|
|
| Methods inherited from class org.eclipse.smila.taskworker.io.IODataObjects |
|---|
addCounters, canCreate, getDataObject, getDataObject, getDataObjectCount, getIOData, getObjectStore, putIOData |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Inputs(java.util.Map<java.lang.String,java.util.List<BulkInfo>> dataObjects,
ObjectStoreService objectStore)
| Method Detail |
|---|
public <T extends Input> T getAsInput(java.lang.String slotName,
java.lang.Class<T> inputClass)
getAsInput(String, int, Class) for details, this method just calls this method with index = 0
java.lang.IllegalArgumentException - if the inputClass cannot be instantiated.
public <T extends Input> T getAsInput(java.lang.String slotName,
int index,
java.lang.Class<T> inputClass)
Input can be used as well as custom
defined class if you need it (be sure to implement the necessary constructor). For example, to get an
Key-Value-Object wrapper for the first object in slot "kvoInputSlot", use
KVOInput kvo = taskContext.getInputs().getAsInput("kvoInputSlot", KVOInput.class);
java.lang.IllegalArgumentException - if the inputClass cannot be instantiated.StreamInput,
RecordInput,
KvoInputpublic StreamInput getAsStreamInput(java.lang.String slotName)
public StreamInput getAsStreamInput(java.lang.String slotName,
int index)
public RecordInput getAsRecordInput(java.lang.String slotName)
public RecordInput getAsRecordInput(java.lang.String slotName,
int index)
public void closeAll()
public void addInputCounters(java.util.Map<java.lang.String,java.lang.Number> counters)
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||