public class Job extends Object implements Iterable<Result>
| Modifier and Type | Field and Description |
|---|---|
(package private) Future<Integer> |
future |
(package private) boolean |
interrupted |
(package private) BufferedLogger |
logger |
(package private) Processor |
processor |
(package private) boolean |
ready |
| Constructor and Description |
|---|
Job(Processor processor,
Cloud cloud,
ChainedLogger chain) |
Job(Processor processor,
Map<String,JobDefinition> list,
Cloud cloud,
ChainedLogger chain)
A Job is defined by several
JobDefinition's, the output is goes to loggers in
ChainedLogger |
| Modifier and Type | Method and Description |
|---|---|
protected void |
findResults()
Defines the several
Results by reading the JobDefinitions in the list. |
int |
getBusy() |
protected Node |
getCacheNode(Node src,
String key)
Gets and/or creates the node representing the 'cached' stream (the result of a conversion),
see the builder property 'org.mmbase.streams.cachestype'.
|
protected Node |
getCacheNode(String key)
Gets and/or creates the node representing the 'cached' stream, uses this (source) node as
infile to create cache from.
|
Result |
getCurrent() |
Logger |
getLogger() |
Node |
getMediafragment() |
Node |
getNode() |
long |
getNumber() |
String |
getProgress() |
Stage |
getStage() |
Thread |
getThread()
Thread in which this Job is running.
|
String |
getUser() |
void |
interrupt() |
boolean |
isInterrupted() |
Iterator<Result> |
iterator() |
boolean |
reached(Stage s) |
void |
ready() |
void |
setNode(Node n)
Source Node on which this Job will run.
|
void |
setThread(Thread t) |
void |
submit(Cloud cloud,
int n,
ChainedLogger chain)
Start actually executing this Job by submitting it at
JobCallable. |
(package private) void |
submit(JobCallable jc)
Re-submit this job.
|
String |
toString() |
void |
waitUntil(Stage stage) |
void |
waitUntilAfter(Stage stage) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorfinal BufferedLogger logger
boolean interrupted
boolean ready
final Processor processor
public Job(Processor processor, Cloud cloud, ChainedLogger chain)
public Job(Processor processor, Map<String,JobDefinition> list, Cloud cloud, ChainedLogger chain)
JobDefinition's, the output is goes to loggers in
ChainedLoggerprocessor - reads config, is called by user. Provides executors.list - the definitionscloud - mmbase cloud nodes belong tochain - loggersprotected void findResults()
Results by reading the JobDefinitions in the list.
Creates streamsourcescaches for Transcoders and asigns TranscoderResults to
them or creates RecognizerResults for JobDefinitions of recognizers.public void submit(Cloud cloud, int n, ChainedLogger chain)
JobCallable.void submit(JobCallable jc)
public Logger getLogger()
protected Node getCacheNode(String key)
key - representation of the way the stream was created from its sourceprotected Node getCacheNode(Node src, String key)
src - source node to create cache stream from, can be another cachekey - representation of the way the stream was created from its source, f.e. transcoding parameterspublic Result getCurrent()
public Thread getThread()
public void setThread(Thread t)
public void setNode(Node n)
public void interrupt()
public boolean isInterrupted()
public boolean reached(Stage s)
public void ready()
public void waitUntil(Stage stage) throws InterruptedException
InterruptedExceptionpublic void waitUntilAfter(Stage stage) throws InterruptedException
InterruptedExceptionpublic Stage getStage()
public String getProgress()
public int getBusy()
public String getUser()
public long getNumber()
public Node getNode()
public Node getMediafragment()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}