Package com.levigo.jadice.server.core
Interface ServerJob
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
abort()
Cancel this Job.void
announceSubPipelineCreation(Node parent, Set<? extends Node> createdNodes)
Propagate that newNode
s were created in a sub-pipeline on behalf of another node.void
error(NodeWorker<?> worker, org.jadice.util.log.qualified.QualifiedLogEvent message)
Propagate a non-fatal, possibly pertaining to a particular node and worker.long
getAge()
Calculate the age of this job, i.e.Job
getClientJob()
File
getServerTempDir()
Get the temporary directory jadice server uses.File
getTempDir()
NodeWorkerFactory
getWorkerFactory()
void
processingFailed(NodeWorker<?> worker, org.jadice.util.log.qualified.QualifiedLogEvent message)
Handle a processing failure, possibly pertaining to a particular node and worker.void
startWorkers(Collection<NodeWorker<?>> workers)
Start worker threads for a given sub-pipeline.void
warning(NodeWorker<?> worker, org.jadice.util.log.qualified.QualifiedLogEvent message)
Propagate a warning, possibly pertaining to a particular node and worker.
-
-
-
Method Detail
-
abort
void abort()
Cancel this Job.
-
processingFailed
void processingFailed(NodeWorker<?> worker, org.jadice.util.log.qualified.QualifiedLogEvent message)
Handle a processing failure, possibly pertaining to a particular node and worker. Calling this method will ultimately abort the job.- Parameters:
worker
- Theworker
that caused the failuremessage
- Reason of the failure
-
warning
void warning(NodeWorker<?> worker, org.jadice.util.log.qualified.QualifiedLogEvent message)
Propagate a warning, possibly pertaining to a particular node and worker.- Parameters:
worker
- Theworker
that caused the warningmessage
- Reason of the warning
-
error
void error(NodeWorker<?> worker, org.jadice.util.log.qualified.QualifiedLogEvent message)
Propagate a non-fatal, possibly pertaining to a particular node and worker.- Parameters:
worker
- Theworker
that caused the errormessage
- Reason of the error
-
startWorkers
void startWorkers(Collection<NodeWorker<?>> workers)
Start worker threads for a given sub-pipeline.- Parameters:
workers
- theNodeWorker
instances to start
-
getTempDir
File getTempDir()
- Returns:
- the job-specific temporary directory.
- See Also:
getServerTempDir()
-
getServerTempDir
File getServerTempDir()
Get the temporary directory jadice server uses. This method is only relevant for certain cases. The usual way to create temporary files is via methodgetTempDir()
.- Returns:
- the temporary directory jadice server uses.
- Since:
- jadice server 5.0.5.0
- See Also:
getTempDir()
-
announceSubPipelineCreation
void announceSubPipelineCreation(Node parent, Set<? extends Node> createdNodes)
Propagate that newNode
s were created in a sub-pipeline on behalf of another node.- Parameters:
parent
- The node that triggered the creationcreatedNodes
- The nodes that were created.
-
getAge
long getAge()
Calculate the age of this job, i.e. the time since it has been started- Returns:
- The age in ms
-
getWorkerFactory
NodeWorkerFactory getWorkerFactory()
-
-