public interface ExecutionLogRepository
| Modifier and Type | Method and Description |
|---|---|
void |
appendTaskLog(ExecutionLog log,
String text)
Appends the given text to the task log for the given execution.
|
Stream<ExecutionLog> |
executionsFor(String taskName,
Optional<String> startId,
int max)
Returns a
Stream containing the execution logs for the given task, up to max elements. |
Optional<byte[]> |
getFile(String taskName,
String id,
String file)
Retrieves the file with the given name, generated by the execution of the given task with the given ID, if it is found.
|
Optional<ExecutionLog> |
getLog(String taskName,
String id)
Returns the
ExecutionLog for the given task execution, by task name and execution id, if it exists in the
repository. |
Optional<String> |
getTaskLog(String taskName,
String id)
Returns the log generated by CronTask's
taskLog method, from the given task with the given execution id, if it is
present on the repository. |
Stream<ExecutionLog> |
latest()
Returns the latest execution of every task that has been stored in this repository.
|
void |
newExecution(ExecutionLog log)
Stores a new execution of a given task.
|
void |
storeFile(ExecutionLog log,
String fileName,
byte[] contents,
boolean append)
Stores the given file to the task execution related to the given
ExecutionLog. |
void |
update(ExecutionLog log)
Stores the updated version of the task log for the given execution.
|
void update(ExecutionLog log)
log - The execution log to storevoid newExecution(ExecutionLog log)
update(ExecutionLog) method, in that it may
used to update the repository's index.log - The new execution log to storevoid appendTaskLog(ExecutionLog log, String text)
log - The execution log for which the text is to be appendedtext - The text to be appendedvoid storeFile(ExecutionLog log, String fileName, byte[] contents, boolean append)
ExecutionLog.log - The execution log for which this file is to be storedfileName - The name of the file to storecontents - The contents to storeappend - Whether the contents should be appended or replace the potentially existing fileStream<ExecutionLog> latest()
Stream<ExecutionLog> executionsFor(String taskName, Optional<String> startId, int max)
Stream containing the execution logs for the given task, up to max elements. If a start id is
provided, the logs will start with the one with the given id, otherwise, the latest executions are returned.taskName - The name of the task for which to retrieve the logsstartId - The optional task id for which to start returning the logs. If empty, the latest executions are returned, if
invalid, an empty stream is returned.max - The maximum number of elements to returnmax latest executions for the given taskOptional<String> getTaskLog(String taskName, String id)
taskLog method, from the given task with the given execution id, if it is
present on the repository. Otherwise, returns an empty Optional.taskName - The name of the task for which to retrieve the logid - The identifier of the execution for which to retrieve the logOptional<byte[]> getFile(String taskName, String id, String file)
Optional.taskName - The name of the task for which to retrieve the fileid - The identifier of the execution for which to retrieve the filefile - The filename to be retrievedOptional<ExecutionLog> getLog(String taskName, String id)
ExecutionLog for the given task execution, by task name and execution id, if it exists in the
repository. Otherwise, returns an empty Optional.taskName - The name of the task for which to retrieve the logid - The identifier of the execution for which to retrieve the logCopyright © 2018 FenixEdu. All rights reserved.