Class Incidents
java.lang.Object
org.opencastproject.serviceregistry.api.Incidents
Create and record job incidents. Facade for
IncidentService.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanalreadyRecordedFailureIncident(long jobId) voidrecord(Job job, Incident.Severity severity, int code) Record an incident for a given job.voidrecord(Job job, Incident.Severity severity, int code, Map<String, String> params, List<Tuple<String, String>> details) Record an incident for a given job.voidrecordFailure(Job job, int code, Throwable t, Map<String, String> params, List<Tuple<String, String>> details) Record a failure incident for a given job.voidrecordFailure(Job job, int code, Map<String, String> params) Record a failure incident for a given job.voidrecordJobCreationIncident(Job job, Throwable t) voidunhandledException(long jobId, Incident.Severity severity, Throwable t) Record an incident for a given job caused by an uncatched exception.voidunhandledException(Job job, Incident.Severity severity, Throwable t) Record an incident for a given job caused by an uncatched exception.
-
Field Details
-
NO_PARAMS
-
NO_DETAILS
-
-
Constructor Details
-
Incidents
-
-
Method Details
-
record
public 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. This method is intended to record client incidents, i.e. incidents crafted by the programmer.- Parameters:
code- A code number. This incident factory method enforces an incident code schema ofjob_type.code, e.g.org.opencastproject.service.1511. So instead of aligningjob.getJobType()and the incident's code prefix manually this is done automatically for you by this method. SeeIncident.getCode().- See Also:
-
record
Record an incident for a given job. This method is intended to record client incidents, i.e. incidents crafted by the programmer.- See Also:
-
recordFailure
Record a failure incident for a given job.- See Also:
-
recordFailure
public 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.- See Also:
-
recordJobCreationIncident
-
unhandledException
Record an incident for a given job caused by an uncatched exception. This method is intended to record incidents by the job system itself, e.g. the job dispatcher. -
unhandledException
Record an incident for a given job caused by an uncatched exception. This method is intended to record incidents by the job system itself, e.g. the job dispatcher. Please note that an incident will only be recorded if none of severityIncident.Severity.FAILUREhas already been recorded by the job or one of its child jobs. If no job with the given job id exists nothing happens. -
alreadyRecordedFailureIncident
public boolean alreadyRecordedFailureIncident(long jobId)
-