Class TaskAuditRepositoryImpl
- java.lang.Object
-
- io.opensw.scheduler.core.domain.audit.TaskAuditRepositoryImpl
-
- All Implemented Interfaces:
TaskAuditRepository
@Component public class TaskAuditRepositoryImpl extends java.lang.Object implements TaskAuditRepository
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringINSERT_QUERYprotected static java.lang.StringPOSTGRE_INSERT_QUERY
-
Constructor Summary
Constructors Constructor Description TaskAuditRepositoryImpl(javax.sql.DataSource dataSource, com.fasterxml.jackson.databind.ObjectMapper mapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanauditTask(java.lang.String key, java.lang.String method, java.lang.String server, java.time.Instant start, java.time.Instant end, java.lang.Exception exception)
-
-
-
Field Detail
-
INSERT_QUERY
protected static final java.lang.String INSERT_QUERY
- See Also:
- Constant Field Values
-
POSTGRE_INSERT_QUERY
protected static final java.lang.String POSTGRE_INSERT_QUERY
- See Also:
- Constant Field Values
-
-
Method Detail
-
auditTask
public boolean auditTask(java.lang.String key, java.lang.String method, java.lang.String server, java.time.Instant start, java.time.Instant end, java.lang.Exception exception) throws DatabaseException- Specified by:
auditTaskin interfaceTaskAuditRepository- Parameters:
key- that identifies taskmethod- class and method where task was runningserver- identification (server hostname)start- is the instant that task start runningend- is the instant that task end runningexception- occurred during run- Returns:
- result of operation
- Throws:
DatabaseException- that was thrown when do not have database configured
-
-