| Package | Description |
|---|---|
| org.opencastproject.job.api | |
| org.opencastproject.serviceregistry.api |
Service implementation classes
|
| org.opencastproject.util |
Utility classes for dealing with media packages, collections, URLs, files, and streams.
|
| Modifier and Type | Class and Description |
|---|---|
class |
JobImpl |
| Modifier and Type | Method and Description |
|---|---|
static Job |
JobParser.parseJob(InputStream in)
Parses a stream representing a
Job |
static Job |
JobParser.parseJob(String serializedForm)
Parses an xml string representing a
Job |
Job |
JaxbJob.toJob() |
| Modifier and Type | Method and Description |
|---|---|
static com.entwinemedia.fn.Fn<Job,JaxbJob> |
JaxbJob.fnFromJob() |
static com.entwinemedia.fn.Fn<JaxbJob,Job> |
JaxbJob.fnToJob() |
Map<Job,Job.Status> |
JobBarrier.Result.getStatus()
Returns the status details.
|
| Modifier and Type | Method and Description |
|---|---|
void |
AbstractJobProducer.acceptJob(Job job)
Asks the job producer to handle the given job using the provided operation and list of arguments.
|
void |
JobProducer.acceptJob(Job job)
Asks the job producer to handle the given job using the provided operation and list of arguments.
|
void |
JobBarrier.addJob(Job job)
Adds the job to the list of jobs to wait for.
|
protected void |
AbstractJobProducer.finallyUpdateJob(Job job)
Private utility to update and optionally fail job, called from a finally block.
|
boolean |
AbstractJobProducer.isReadyToAccept(Job job)
Whether the job can be accepted.
|
boolean |
JobProducer.isReadyToAccept(Job job)
Whether the job can be accepted.
|
protected abstract String |
AbstractJobProducer.process(Job job)
Asks the overriding class to process the arguments using the given operation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
JaxbJobList.setJobs(List<Job> jobs) |
| Constructor and Description |
|---|
JaxbJob(Job job) |
JobBarrier(Job waiter,
ServiceRegistry registry)
Creates a barrier without any jobs, using
registry to poll for the outcome of the monitored jobs using
the default polling interval JobBarrier.DEFAULT_POLLING_INTERVAL. |
JobBarrier(Job waiter,
ServiceRegistry registry,
Job... jobs)
Creates a barrier for
jobs, using registry to poll for the outcome of the monitored jobs
using the default polling interval JobBarrier.DEFAULT_POLLING_INTERVAL. |
JobBarrier(Job waiter,
ServiceRegistry registry,
Job... jobs)
Creates a barrier for
jobs, using registry to poll for the outcome of the monitored jobs
using the default polling interval JobBarrier.DEFAULT_POLLING_INTERVAL. |
JobBarrier(Job waiter,
ServiceRegistry registry,
long pollingInterval)
Creates a wrapper for
job, using registry to poll for the job outcome. |
JobBarrier(Job waiter,
ServiceRegistry registry,
long pollingInterval,
Job... jobs)
Creates a wrapper for
job, using registry to poll for the job outcome. |
JobBarrier(Job waiter,
ServiceRegistry registry,
long pollingInterval,
Job... jobs)
Creates a wrapper for
job, using registry to poll for the job outcome. |
| Constructor and Description |
|---|
JaxbJobList(Collection<? extends Job> jobs) |
Result(Map<Job,Job.Status> status)
Creates a new job barrier result.
|
| Modifier and Type | Field and Description |
|---|---|
protected Job |
ServiceRegistryInMemoryImpl.currentJob
Holds the current running job
|
| Modifier and Type | Field and Description |
|---|---|
protected Map<ServiceRegistrationInMemoryImpl,Set<Job>> |
ServiceRegistryInMemoryImpl.jobHosts
A mapping of services to jobs
|
| Modifier and Type | Method and Description |
|---|---|
Job |
ServiceRegistry.createJob(String type,
String operation)
Create and store a new job that will be dispatched as soon as possible.
|
Job |
ServiceRegistryInMemoryImpl.createJob(String type,
String operation)
Create and store a new job that will be dispatched as soon as possible.
|
Job |
ServiceRegistry.createJob(String type,
String operation,
Float jobLoad)
Create and store a new job that will be dispatched as soon as possible.
|
Job |
ServiceRegistryInMemoryImpl.createJob(String type,
String operation,
Float jobLoad)
Create and store a new job that will be dispatched as soon as possible.
|
Job |
ServiceRegistry.createJob(String type,
String operation,
List<String> arguments)
Create and store a new job that will be dispatched as soon as possible.
|
Job |
ServiceRegistryInMemoryImpl.createJob(String type,
String operation,
List<String> arguments)
Create and store a new job that will be dispatched as soon as possible.
|
Job |
ServiceRegistry.createJob(String type,
String operation,
List<String> arguments,
Float jobLoad)
Create and store a new job that will be dispatched as soon as possible.
|
Job |
ServiceRegistryInMemoryImpl.createJob(String type,
String operation,
List<String> arguments,
Float jobLoad)
Create and store a new job that will be dispatched as soon as possible.
|
Job |
ServiceRegistry.createJob(String type,
String operation,
List<String> arguments,
String payload)
Create and store a new job that will be dispatched as soon as possible.
|
Job |
ServiceRegistryInMemoryImpl.createJob(String type,
String operation,
List<String> arguments,
String payload)
Create and store a new job that will be dispatched as soon as possible.
|
Job |
ServiceRegistry.createJob(String type,
String operation,
List<String> arguments,
String payload,
boolean queueable)
Create and store a new job.
|
Job |
ServiceRegistryInMemoryImpl.createJob(String type,
String operation,
List<String> arguments,
String payload,
boolean queueable)
Create and store a new job.
|
Job |
ServiceRegistry.createJob(String type,
String operation,
List<String> arguments,
String payload,
boolean queueable,
Float jobLoad)
Create and store a new job.
|
Job |
ServiceRegistryInMemoryImpl.createJob(String type,
String operation,
List<String> arguments,
String payload,
boolean queueable,
Float jobLoad)
Create and store a new job.
|
Job |
ServiceRegistry.createJob(String type,
String operation,
List<String> arguments,
String payload,
boolean queueable,
Job parentJob)
Create and store a new job.
|
Job |
ServiceRegistryInMemoryImpl.createJob(String type,
String operation,
List<String> arguments,
String payload,
boolean queueable,
Job parentJob)
Create and store a new job.
|
Job |
ServiceRegistry.createJob(String type,
String operation,
List<String> arguments,
String payload,
boolean queueable,
Job parentJob,
Float jobLoad)
Create and store a new job.
|
Job |
ServiceRegistryInMemoryImpl.createJob(String type,
String operation,
List<String> arguments,
String payload,
boolean queueable,
Job parentJob,
Float jobLoad)
Create and store a new job.
|
Job |
ServiceRegistry.createJob(String type,
String operation,
List<String> arguments,
String payload,
Float jobLoad)
Create and store a new job that will be dispatched as soon as possible.
|
Job |
ServiceRegistryInMemoryImpl.createJob(String type,
String operation,
List<String> arguments,
String payload,
Float jobLoad)
Create and store a new job that will be dispatched as soon as possible.
|
Job |
ServiceRegistry.getCurrentJob()
Gets the current running job
|
Job |
ServiceRegistryInMemoryImpl.getCurrentJob() |
Job |
ServiceRegistry.getJob(long id)
Gets a receipt by its ID, or null if not found
|
Job |
ServiceRegistryInMemoryImpl.getJob(long id)
Gets a receipt by its ID, or null if not found
|
Job |
NopService.nop() |
Job |
ServiceRegistry.updateJob(Job job)
Update the job in the database
|
Job |
ServiceRegistryInMemoryImpl.updateJob(Job job)
Update the job in the database
|
| Modifier and Type | Method and Description |
|---|---|
List<Job> |
ServiceRegistry.getActiveJobs()
Get the list of active jobs.
|
List<Job> |
ServiceRegistryInMemoryImpl.getActiveJobs()
Get the list of active jobs.
|
List<Job> |
ServiceRegistry.getChildJobs(long id)
Get all child jobs from a job
|
List<Job> |
ServiceRegistryInMemoryImpl.getChildJobs(long id)
Get all child jobs from a job
|
List<Job> |
ServiceRegistry.getJobs(String serviceType,
Job.Status status)
Gets the list of jobs that match the specified parameters.
|
List<Job> |
ServiceRegistryInMemoryImpl.getJobs(String serviceType,
Job.Status status)
Gets the list of jobs that match the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
Job |
ServiceRegistry.createJob(String type,
String operation,
List<String> arguments,
String payload,
boolean queueable,
Job parentJob)
Create and store a new job.
|
Job |
ServiceRegistryInMemoryImpl.createJob(String type,
String operation,
List<String> arguments,
String payload,
boolean queueable,
Job parentJob)
Create and store a new job.
|
Job |
ServiceRegistry.createJob(String type,
String operation,
List<String> arguments,
String payload,
boolean queueable,
Job parentJob,
Float jobLoad)
Create and store a new job.
|
Job |
ServiceRegistryInMemoryImpl.createJob(String type,
String operation,
List<String> arguments,
String payload,
boolean queueable,
Job parentJob,
Float jobLoad)
Create and store a new job.
|
protected boolean |
ServiceRegistryInMemoryImpl.dispatchJob(Job job)
Dispatches the job to the least loaded service or throws a
ServiceUnavailableException if there is no
such service. |
void |
Incidents.record(Job job,
Incident.Severity severity,
int code)
Record an incident for a given job.
|
void |
Incidents.record(Job job,
Incident.Severity severity,
int code,
Map<String,String> params,
List<Tuple<String,String>> details)
Record an incident for a given job.
|
void |
Incidents.recordFailure(Job job,
int code)
Record a failure incident for a given job.
|
void |
Incidents.recordFailure(Job job,
int code,
List<Tuple<String,String>> details)
Record a failure incident for a given job.
|
void |
Incidents.recordFailure(Job job,
int code,
Map<String,String> params)
Record a failure incident for a given job.
|
void |
Incidents.recordFailure(Job job,
int code,
Map<String,String> params,
List<Tuple<String,String>> details)
Record a failure incident for a given job.
|
void |
Incidents.recordFailure(Job job,
int code,
Throwable t,
List<Tuple<String,String>> details)
Record a failure incident for a given job.
|
void |
Incidents.recordFailure(Job job,
int code,
Throwable t,
Map<String,String> params,
List<Tuple<String,String>> details)
Record a failure incident for a given job.
|
void |
Incidents.recordJobCreationIncident(Job job,
Throwable t) |
void |
Incidents.recordMigrationIncident(Job job,
String error) |
void |
ServiceRegistry.setCurrentJob(Job job)
Sets the current running job
|
void |
ServiceRegistryInMemoryImpl.setCurrentJob(Job job) |
Incident |
IncidentService.storeIncident(Job job,
Date timestamp,
String code,
Incident.Severity severity,
Map<String,String> descriptionParameters,
List<Tuple<String,String>> details)
Stores a new job incident.
|
void |
Incidents.unhandledException(Job job,
Incident.Severity severity,
Throwable t)
Record an incident for a given job caused by an uncatched exception.
|
Job |
ServiceRegistry.updateJob(Job job)
Update the job in the database
|
Job |
ServiceRegistryInMemoryImpl.updateJob(Job job)
Update the job in the database
|
| Modifier and Type | Field and Description |
|---|---|
static Function<org.apache.http.HttpResponse,Option<Job>> |
JobUtil.jobFromHttpResponse |
| Modifier and Type | Method and Description |
|---|---|
static List<Job> |
JobUtil.getNonFinished(List<Job> jobs)
Get all jobs that are not in state
Job.Status.FINISHED. |
static Function<Job,MediaPackageElement> |
JobUtil.payloadAsMediaPackageElement(Job waiter,
ServiceRegistry reg)
Interpret the payload of a completed
Job as a MediaPackageElement. |
static Function<Job,MediaPackageElement> |
JobUtil.payloadAsMediaPackageElement(ServiceRegistry reg)
Interpret the payload of a completed
Job as a MediaPackageElement. |
static com.entwinemedia.fn.data.Opt<Job> |
JobUtil.update(ServiceRegistry reg,
Job job)
Get the latest state of a job.
|
static Function<Job,JobBarrier.Result> |
JobUtil.waitForJob(Job waiter,
ServiceRegistry reg,
Option<Long> timeout)
|
static Function<Job,JobBarrier.Result> |
JobUtil.waitForJob(ServiceRegistry reg,
Option<Long> timeout)
|
static Function<Job,Boolean> |
JobUtil.waitForJobSuccess(Job waiter,
ServiceRegistry reg,
Option<Long> timeout)
Wait for the job to complete and return the success value.
|
static Function<Job,Boolean> |
JobUtil.waitForJobSuccess(ServiceRegistry reg,
Option<Long> timeout)
Wait for the job to complete and return the success value.
|
| Modifier and Type | Method and Description |
|---|---|
static com.entwinemedia.fn.data.Opt<String> |
JobUtil.getPayload(ServiceRegistry reg,
Job job)
Update the job from the service registry and get its payload.
|
static boolean |
JobUtil.isReadyToDispatch(Job job)
Returns
true if the job is ready to be dispatched. |
static javax.ws.rs.core.Response |
RestUtil.R.ok(Job job) |
static Function<Job,MediaPackageElement> |
JobUtil.payloadAsMediaPackageElement(Job waiter,
ServiceRegistry reg)
Interpret the payload of a completed
Job as a MediaPackageElement. |
static com.entwinemedia.fn.data.Opt<Job> |
JobUtil.update(ServiceRegistry reg,
Job job)
Get the latest state of a job.
|
static JobBarrier.Result |
JobUtil.waitForJob(Job waiter,
ServiceRegistry reg,
Job job)
Check if
job is not done yet and wait in case. |
static Function<Job,JobBarrier.Result> |
JobUtil.waitForJob(Job waiter,
ServiceRegistry reg,
Option<Long> timeout)
|
static JobBarrier.Result |
JobUtil.waitForJob(Job waiter,
ServiceRegistry reg,
Option<Long> timeout,
Job job)
Check if
job is not done yet and wait in case. |
static JobBarrier.Result |
JobUtil.waitForJob(ServiceRegistry reg,
Job job)
Check if
job is not done yet and wait in case. |
static JobBarrier.Result |
JobUtil.waitForJob(ServiceRegistry reg,
Option<Long> timeout,
Job job)
Check if
job is not done yet and wait in case. |
static JobBarrier.Result |
JobUtil.waitForJobs(Job waiter,
ServiceRegistry reg,
Collection<Job> jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static JobBarrier.Result |
JobUtil.waitForJobs(Job waiter,
ServiceRegistry reg,
Job... jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static JobBarrier.Result |
JobUtil.waitForJobs(Job waiter,
ServiceRegistry reg,
Job... jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static JobBarrier.Result |
JobUtil.waitForJobs(Job waiter,
ServiceRegistry reg,
long timeout,
Collection<Job> jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static JobBarrier.Result |
JobUtil.waitForJobs(Job waiter,
ServiceRegistry reg,
long timeout,
Job... jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static JobBarrier.Result |
JobUtil.waitForJobs(Job waiter,
ServiceRegistry reg,
long timeout,
Job... jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static JobBarrier.Result |
JobUtil.waitForJobs(Job waiter,
ServiceRegistry reg,
long pollingInterval,
long timeout,
Job... jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static JobBarrier.Result |
JobUtil.waitForJobs(Job waiter,
ServiceRegistry reg,
long pollingInterval,
long timeout,
Job... jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static JobBarrier.Result |
JobUtil.waitForJobs(ServiceRegistry reg,
Job... jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static JobBarrier.Result |
JobUtil.waitForJobs(ServiceRegistry reg,
long timeout,
Job... jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static Function<Job,Boolean> |
JobUtil.waitForJobSuccess(Job waiter,
ServiceRegistry reg,
Option<Long> timeout)
Wait for the job to complete and return the success value.
|
| Modifier and Type | Method and Description |
|---|---|
static List<Job> |
JobUtil.getNonFinished(List<Job> jobs)
Get all jobs that are not in state
Job.Status.FINISHED. |
static long |
JobUtil.sumQueueTime(List<Job> jobs)
Sum up the queue time of a list of jobs.
|
static JobBarrier.Result |
JobUtil.waitForJobs(Job waiter,
ServiceRegistry reg,
Collection<Job> jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static JobBarrier.Result |
JobUtil.waitForJobs(Job waiter,
ServiceRegistry reg,
long timeout,
Collection<Job> jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static JobBarrier.Result |
JobUtil.waitForJobs(ServiceRegistry reg,
Collection<Job> jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
static JobBarrier.Result |
JobUtil.waitForJobs(ServiceRegistry reg,
long timeout,
Collection<Job> jobs)
Waits for the result of a created barrier for
jobs, using registry to poll for the
outcome of the monitored jobs using the default polling interval. |
| Constructor and Description |
|---|
JobCanceledException(Job job) |
Copyright © 2009–2021 Opencast Project. All rights reserved.