public final class Incidents extends Object
IncidentService.| Modifier and Type | Field and Description |
|---|---|
static List<Tuple<String,String>> |
NO_DETAILS |
static Map<String,String> |
NO_PARAMS |
| Constructor and Description |
|---|
Incidents(ServiceRegistry sr,
IncidentService is) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
alreadyRecordedFailureIncident(long jobId) |
void |
record(Job job,
Incident.Severity severity,
int code)
Record an incident for a given job.
|
void |
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 |
recordFailure(Job job,
int code)
Record a failure incident for a given job.
|
void |
recordFailure(Job job,
int code,
List<Tuple<String,String>> details)
Record a failure incident for a given job.
|
void |
recordFailure(Job job,
int code,
Map<String,String> params)
Record a failure incident for a given job.
|
void |
recordFailure(Job job,
int code,
Map<String,String> params,
List<Tuple<String,String>> details)
Record a failure incident for a given job.
|
void |
recordFailure(Job job,
int code,
Throwable t,
List<Tuple<String,String>> details)
Record a failure incident for a given job.
|
void |
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 |
recordJobCreationIncident(Job job,
Throwable t) |
void |
recordMigrationIncident(Job job,
String error) |
void |
unhandledException(Job job,
Incident.Severity severity,
Throwable t)
Record an incident for a given job caused by an uncatched exception.
|
void |
unhandledException(long jobId,
Incident.Severity severity,
Throwable t)
Record an incident for a given job caused by an uncatched exception.
|
public Incidents(ServiceRegistry sr, IncidentService is)
public void record(Job job, Incident.Severity severity, int code, Map<String,String> params, List<Tuple<String,String>> details)
code - A code number. This incident factory method enforces an incident code schema of job_type.code
, e.g. org.opencastproject.service.1511 . So instead of aligning
job.getJobType() and the incident's code prefix manually this is done automatically for you
by this method. See Incident.getCode().Incidentpublic void record(Job job, Incident.Severity severity, int code)
public void recordFailure(Job job, int code)
public void recordFailure(Job job, int code, Map<String,String> params)
public void recordFailure(Job job, int code, List<Tuple<String,String>> details)
public void recordFailure(Job job, int code, Map<String,String> params, List<Tuple<String,String>> details)
public void recordFailure(Job job, int code, Throwable t, List<Tuple<String,String>> details)
public void recordFailure(Job job, int code, Throwable t, Map<String,String> params, List<Tuple<String,String>> details)
public void unhandledException(Job job, Incident.Severity severity, Throwable t)
public void unhandledException(long jobId,
Incident.Severity severity,
Throwable t)
Incident.Severity.FAILURE has already been recorded by the job or
one of its child jobs. If no job with the given job id exists nothing happens.public boolean alreadyRecordedFailureIncident(long jobId)
Copyright © 2009–2021 Opencast Project. All rights reserved.