Class REPLJob

java.lang.Object
de.uni_kiel.rz.fdr.repl.REPLJob
All Implemented Interfaces:
Serializable

public class REPLJob extends Object implements Serializable
This class represents a single job to be executed in the background. It also provides static methods to manage all jobs that are currently on file.
See Also:
  • Field Details

    • THREAD_PREFIX

      public static final String THREAD_PREFIX
      Threads of cau-repls job workers have names that start with this prefix. Threads belonging to a single job will also be placed in a common thread group.
      See Also:
    • CALLBACK_LOG_TO_SHELL

      public static final Consumer<REPLJob.JobEvent> CALLBACK_LOG_TO_SHELL
      A predefined job event handler that you can use; it logs regular process messages to your SSH session. This will make it hard to use the session interactively while the job is running.
    • CALLBACK_PAUSE_ON_ERROR

      public static final Consumer<REPLJob.JobEvent> CALLBACK_PAUSE_ON_ERROR
      A predefined job event handler you can use, it pauses the job whenever an error happens. if you enabled concurrency, multiple errors might accumulate in pause event.
  • Method Details

    • list

      public static List<REPLJob> list()
      Get the list of all jobs that are not archived - that is: loaded in memory.
      Returns:
      the list of all jobs that are not archived
    • listArchived

      public static List<String> listArchived()
      Get the list of all archived jobs' keys.
      Returns:
      The list of all archived jobs' keys.
    • streamArchived

      public static Stream<REPLJob> streamArchived()
      Stream all archived jobs without adding them to the list of active jobs. This can be a time-consuming operation, because all inputs and results will be loaded as well. Note that the job instances that this method streams are not resumable by design. If this is important, use one of the various resume() methods instead.
      Returns:
      A stream of all archived jobs.
    • pruneArchived

      public static List<String> pruneArchived()
      Removes the state files of all archived jobs that were completed successfully.
      Returns:
      The keys of all pruned jobs.
    • get

      public static REPLJob get(String key)
      Get a loaded job by key. To retrieve an archived job, use one of the load() or resume() methods instead.
      Parameters:
      key - The key to look up.
      Returns:
      The Job with the key, or null if none was found.
    • archive

      public static boolean archive(REPLJob job) throws JobException
      Archives a loaded job. Jobs that are still active can't be archived. Archiving an active job will throw an exception.
      Parameters:
      job - The job to archive.
      Returns:
      Flag indicating whether this job was archived or not.
      Throws:
      JobException - The action failed, e.g. because the job's state prevented it.
    • archive

      public static boolean archive(String key) throws JobException
      Archives a loaded job. Jobs that are still active can't be archived. Archiving an active job will throw an exception.
      Parameters:
      key - The key of the job to archive.
      Returns:
      Flag indicating whether this job was archived or not.
      Throws:
      JobException - The action failed, e.g. because the job's state prevented it.
    • repljob

      public static REPLJob repljob(Supplier<Serializable> supplier) throws IOException
      Creates a new job without inputs or concurrency that is ready to be started.
      Parameters:
      supplier - The job action.
      Returns:
      The new job.
      Throws:
      IOException - The job's state file could not be created.
    • repljob

      public static REPLJob repljob(Supplier<Serializable> supplier, int concurrency) throws IOException
      Creates a new job without inputs that is ready to be started.
      Parameters:
      supplier - The job action.
      concurrency - The concurrency level to use.
      Returns:
      The new job.
      Throws:
      IOException - The job's state file could not be created.
    • repljob

      public static REPLJob repljob(Supplier<Serializable> supplier, String name) throws IOException
      Creates a new job without inputs or concurrency that is ready to be started.
      Parameters:
      supplier - The job action.
      name - A name for the job that will be displayed in the job list.
      Returns:
      The new job.
      Throws:
      IOException - The job's state file could not be created.
    • repljob

      public static REPLJob repljob(BiFunction<Serializable,REPLJob,Serializable> function, List<Serializable> inputs) throws IOException
      Creates a new job with inputs or concurrency that is ready to be started.
      Parameters:
      function - The job action.
      inputs - The inputs that the job action will operate on.
      Returns:
      The new job.
      Throws:
      IOException - The job's state file could not be created.
    • repljob

      public static REPLJob repljob(groovy.lang.Closure<Serializable> closure, List<Serializable> inputs) throws IOException
      Creates a new job with inputs and no concurrency that is ready to be started.
      Parameters:
      closure - The job action.
      inputs - The inputs that the job action will operate on.
      Returns:
      The new job.
      Throws:
      IOException - The job's state file could not be created.
    • repljob

      public static REPLJob repljob(BiFunction<Serializable,REPLJob,Serializable> function, List<Serializable> inputs, int concurrency) throws IOException
      Creates a new job with inputs that is ready to be started.
      Parameters:
      function - The job action.
      inputs - The inputs that the job action will operate on.
      concurrency - The concurrency level to use.
      Returns:
      The new job.
      Throws:
      IOException - The job's state file could not be created.
    • repljob

      public static REPLJob repljob(groovy.lang.Closure<Serializable> closure, List<Serializable> inputs, int concurrency) throws IOException
      Creates a new job with inputs that is ready to be started.
      Parameters:
      closure - The job action.
      inputs - The inputs that the job action will operate on.
      concurrency - The concurrency level to use.
      Returns:
      The new job.
      Throws:
      IOException - The job's state file could not be created.
    • repljob

      public static REPLJob repljob(BiFunction<Serializable,REPLJob,Serializable> function, List<Serializable> inputs, String name) throws IOException
      Creates a new job with inputs and no concurrency that is ready to be started.
      Parameters:
      function - The job action.
      inputs - The inputs that the job action will operate on.
      name - A name for the job that will be displayed in the job list.
      Returns:
      The new job.
      Throws:
      IOException - The job's state file could not be created.
    • repljob

      public static REPLJob repljob(groovy.lang.Closure<Serializable> closure, List<Serializable> inputs, String name) throws IOException
      Creates a new job with inputs and no concurrency that is ready to be started.
      Parameters:
      closure - The job action.
      inputs - The inputs that the job action will operate on.
      name - A name for the job that will be displayed in the job list.
      Returns:
      The new job.
      Throws:
      IOException - The job's state file could not be created.
    • repljob

      public static REPLJob repljob(BiFunction<Serializable,REPLJob,Serializable> function, List<Serializable> inputs, int concurrency, String name) throws IOException
      Creates a new job with inputs that is ready to be started.
      Parameters:
      function - The job action.
      inputs - The inputs that the job action will operate on.
      concurrency - The concurrency level to use.
      name - A name for the job that will be displayed in the job list.
      Returns:
      The new job.
      Throws:
      IOException - The job's state file could not be created.
    • repljob

      public static REPLJob repljob(groovy.lang.Closure<Serializable> closure, List<Serializable> inputs, int concurrency, String name) throws IOException
      Creates a new job with inputs that is ready to be started.
      Parameters:
      closure - The job action.
      inputs - The inputs that the job action will operate on.
      concurrency - The concurrency level to use.
      name - A name for the job that will be displayed in the job list.
      Returns:
      The new job.
      Throws:
      IOException - The job's state file could not be created.
    • repljob

      public static REPLJob repljob(groovy.lang.Closure<Serializable> closure, List<Serializable> inputs, int concurrency, String name, boolean becomeDelegate) throws IOException
      Creates a new job with inputs that is ready to be started.
      Parameters:
      closure - The job action.
      inputs - The inputs that the job action will operate on.
      concurrency - The concurrency level to use.
      name - A name for the job that will be displayed in the job list.
      becomeDelegate - Controls whether the job instance should be set as the Closure's delegate.
      Returns:
      The new job.
      Throws:
      IOException - The job's state file could not be created.
    • resume

      public static REPLJob resume(String key, groovy.lang.Closure<Serializable> closure) throws IOException, ObjectStoreInvalidException, JobException
      Loads an archived job instance and prepares unfinished and unsuccessful inputs for resuming.
      Parameters:
      key - The key of the archived job to resume.
      closure - The job action.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      Loads an archived job instance and prepares unfinished and unsuccessful inputs for resuming.
      Parameters:
      key - The key of the archived job to resume.
      function - The job action.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      public static REPLJob resume(String key, Supplier<Serializable> supplier) throws IOException, ObjectStoreInvalidException, JobException
      Loads an archived job instance and prepares unfinished and unsuccessful inputs for resuming.
      Parameters:
      key - The key of the archived job to resume.
      supplier - The job action.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      public static REPLJob resume(String key, groovy.lang.Closure<Serializable> closure, boolean retrySuccess, boolean retryErrors) throws IOException, ObjectStoreInvalidException, JobException
      Loads an archived job instance and prepares it for resuming.
      Parameters:
      key - The key of the archived job to resume.
      closure - The job action.
      retrySuccess - Controls whether previously successful inputs should be resubmitted.
      retryErrors - Controls whether previously unsuccessful inputs should be resubmitted.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      public static REPLJob resume(String key, groovy.lang.Closure<Serializable> closure, boolean retrySuccess, boolean retryErrors, boolean becomeDelegate) throws IOException, ObjectStoreInvalidException, JobException
      Loads an archived job instance and prepares it for resuming.
      Parameters:
      key - The key of the archived job to resume.
      closure - The job action.
      retrySuccess - Controls whether previously successful inputs should be resubmitted.
      retryErrors - Controls whether previously unsuccessful inputs should be resubmitted.
      becomeDelegate - Controls whether the job instance should be set as the Closure's delegate.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      public static REPLJob resume(String key, BiFunction<Serializable,REPLJob,Serializable> function, boolean retrySuccess, boolean retryErrors) throws IOException, ObjectStoreInvalidException, JobException
      Loads an archived job instance and prepares it for resuming.
      Parameters:
      key - The key of the archived job to resume.
      function - The job action.
      retrySuccess - Controls whether previously successful inputs should be resubmitted.
      retryErrors - Controls whether previously unsuccessful inputs should be resubmitted.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      public static REPLJob resume(String key, Supplier<Serializable> supplier, boolean retrySuccess, boolean retryErrors) throws IOException, ObjectStoreInvalidException, JobException
      Loads an archived job instance and prepares it for resuming.
      Parameters:
      key - The key of the archived job to resume.
      supplier - The job action.
      retrySuccess - Controls whether previously successful inputs should be resubmitted.
      retryErrors - Controls whether previously unsuccessful inputs should be resubmitted.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      public static REPLJob resume(File path, groovy.lang.Closure<Serializable> closure) throws IOException, ObjectStoreInvalidException, JobException
      Loads an archived job instance and prepares unfinished and unsuccessful inputs for resuming.
      Parameters:
      path - The location of the archived job's state file.
      closure - The job action.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      Loads an archived job instance and prepares unfinished and unsuccessful inputs for resuming.
      Parameters:
      path - The location of the archived job's state file.
      function - The job action.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      public static REPLJob resume(File path, Supplier<Serializable> supplier) throws IOException, ObjectStoreInvalidException, JobException
      Loads an archived job instance and prepares unfinished and unsuccessful inputs for resuming.
      Parameters:
      path - The location of the archived job's state file.
      supplier - The job action.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      public static REPLJob resume(File path, groovy.lang.Closure<Serializable> closure, boolean retrySuccess, boolean retryErrors) throws IOException, ObjectStoreInvalidException, JobException
      Loads an archived job instance and prepares it for resuming.
      Parameters:
      path - The location of the archived job's state file.
      closure - The job action.
      retrySuccess - Controls whether previously successful inputs should be resubmitted.
      retryErrors - Controls whether previously unsuccessful inputs should be resubmitted.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      public static REPLJob resume(File path, groovy.lang.Closure<Serializable> closure, boolean retrySuccess, boolean retryErrors, boolean becomeDelegate) throws IOException, ObjectStoreInvalidException, JobException
      Loads an archived job instance and prepares it for resuming.
      Parameters:
      path - The location of the archived job's state file.
      closure - The job action.
      retrySuccess - Controls whether previously successful inputs should be resubmitted.
      retryErrors - Controls whether previously unsuccessful inputs should be resubmitted.
      becomeDelegate - Controls whether the job instance should be set as the Closure's delegate.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      public static REPLJob resume(File path, BiFunction<Serializable,REPLJob,Serializable> function, boolean retrySuccess, boolean retryErrors) throws IOException, ObjectStoreInvalidException, JobException
      Loads an archived job instance and prepares it for resuming.
      Parameters:
      path - The location of the archived job's state file.
      function - The job action.
      retrySuccess - Controls whether previously successful inputs should be resubmitted.
      retryErrors - Controls whether previously unsuccessful inputs should be resubmitted.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • resume

      public static REPLJob resume(File path, Supplier<Serializable> supplier, boolean retrySuccess, boolean retryErrors) throws IOException, ObjectStoreInvalidException, JobException
      Loads an archived job instance and prepares it for resuming.
      Parameters:
      path - The location of the archived job's state file.
      supplier - The job action.
      retrySuccess - Controls whether previously successful inputs should be resubmitted.
      retryErrors - Controls whether previously unsuccessful inputs should be resubmitted.
      Returns:
      A new instance of the archived job that can be resumed.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's state file is corrupted.
      JobException - The job could not be resumed.
    • load

      public static REPLJob load(String key) throws IOException, ObjectStoreInvalidException
      Loads an archived job without preparing it for resuming. Such instances can't be started, but allow you to inspect their state unaltered.
      Parameters:
      key - The key of the job to load.
      Returns:
      The job.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's object store is corrupted.
    • load

      public static REPLJob load(File path) throws IOException, ObjectStoreInvalidException
      Loads an archived job without preparing it for resuming. Such instances can't be started, but allow you to inspect their state unaltered.
      Parameters:
      path - The location of the archived job's state file.
      Returns:
      The job.
      Throws:
      IOException - A file could not be accessed.
      ObjectStoreInvalidException - The old job's object store is corrupted.
    • start

      public Future<REPLJob.JobProgress> start() throws JobException
      Starts processing. Each job instance can only be started once.
      Returns:
      A Future that will complete once the job is no longer active.
      Throws:
      JobException - The job could not be started, e.g. because it is in the wrong state.
    • start

      public Future<REPLJob.JobProgress> start(ThreadFactory threadFactory) throws JobException
      Starts processing. Each job instance can only be started once.
      Parameters:
      threadFactory - A custom Thread Factory that will be used for the worker threads.
      Returns:
      A Future that will complete once the job is no longer active.
      Throws:
      JobException - The job could not be started, e.g. because it is in the wrong state.
    • start

      public Future<REPLJob.JobProgress> start(Consumer<REPLJob.JobEvent> progressCallback) throws JobException
      Starts processing. Each job instance can only be started once.
      Parameters:
      progressCallback - A callback that can monitor and control the job's execution. Multiple callbacks can be chained with Consumer.andThen(Consumer). Note that your callback will be run from the job's main control thread, so you should offload long-running activities triggered by it to a different thread or risk lowering the job's throughput.
      Returns:
      A Future that will complete once the job is no longer active.
      Throws:
      JobException - The job could not be started, e.g. because it is in the wrong state.
    • start

      public Future<REPLJob.JobProgress> start(ThreadFactory threadFactory, Consumer<REPLJob.JobEvent> progressCallback) throws JobException
      Starts processing. Each job instance can only be started once.
      Parameters:
      threadFactory - A custom Thread Factory that will be used for the worker threads.
      progressCallback - A callback that can monitor and control the job's execution. Multiple callbacks can be chained with Consumer.andThen(Consumer). Note that your callback will be run from the job's main control thread, so you should offload long-running activities triggered by it to a different thread or risk lowering the job's throughput.
      Returns:
      A Future that will complete once the job is no longer active.
      Throws:
      JobException - The job could not be started, e.g. because it is in the wrong state.
    • getProgress

      public REPLJob.JobProgress getProgress()
      Gets the job's current progress.
      Returns:
      The job's current progress.
    • retryIndex

      public void retryIndex(int index) throws JobException
      Flag the input item with the specified index for resuming. This makes sure that it will be reprocessed regardless of its previous success. You must call this method before starting the job.
      Parameters:
      index - The index of the input item to resume.
      Throws:
      JobException - The job's state does not permit changing this value.
    • cancel

      public boolean cancel() throws JobException
      Cancels a running job. The instance will immediately transition to CANCELLING status and wait for all currently active workers to finish their current inputs. When they all have terminated, the job will transition to CANCELLED status. If some workers hang around for too long, it is safe to subsequently call cancelForce() again on the job. Jobs without inputs must use cancelForce().
      Returns:
      A flag indicating whether a concel was actually requested, or unneccesary because the job had already finished in the meantime.
      Throws:
      JobException - The job's state does not permit this action.
    • cancelForce

      public boolean cancelForce(int timeoutSeconds) throws JobException
      Forcefully cancels a running job. The instance will immediately transition to CANCELLING status and wait the specified number of seconds for all currently active workers to finish their current inputs. If a worker is still active after the timeout, an attempt is made to forecefully terminate its thread. After this, the job will transition to CANCELLED status.
      Parameters:
      timeoutSeconds - The number of seconds to wait before forcefully terminating a worker's thread.
      Returns:
      A flag indicating whether a concel was actually requested, or unneccesary because the job had already finished in the meantime.
      Throws:
      JobException - The job's state does not permit this action.
    • pause

      public boolean pause() throws JobException
      Pauses a running job. The job will immediately transition to PAUSING state and workers will no longer be supplied with new inputs. After all workers have finisihed their current inputs, the job will transition to PAUSED. Note that jobs without inputs can't be paused. The invocation will raise an exception in this case.
      Returns:
      A flag indicating whether the job was newly paused, or whether no actual change was made (e.g. because it had already been paused).
      Throws:
      JobException - The job's state does not permit this action.
    • unpause

      public Long unpause() throws JobException
      Restarts processing after a job has been paused. Note that jobs without inputs can't be paused. The invocation will raise an exception in this case.
      Returns:
      The length of this pause period in milliseconds, or null if the job was not actually unpaused (e.g. because it was not actually paused before).
      Throws:
      JobException - The job's state does not permit this action.
    • getKey

      public String getKey()
      Get the job's key.
      Returns:
      The job's key.
    • getConcurrency

      public int getConcurrency()
      Get the job's concurrency level.
      Returns:
      The job's concurrency level.
    • setConcurrency

      public void setConcurrency(int concurrency)
      Set the job's concurrency level. This method is safe to use while the job is running, unless you are using the Auto Tune feature. If you reduce a job's concurrency, your change will take effect gradually as old workers finish their prior input.
      Parameters:
      concurrency - The new concurrency level.
    • getName

      public String getName()
      Get the job's name.
      Returns:
      The job's name.
    • getProgressCallback

      public Consumer<REPLJob.JobEvent> getProgressCallback()
      Gets the job's current progress callback.
      Returns:
      The job's current progress callback.
    • setProgressCallback

      public void setProgressCallback(Consumer<REPLJob.JobEvent> progressCallback)
      Sets the job's progress callback. This method is safe to use while the job is active.
      Parameters:
      progressCallback - The new progress callback.
    • setInternalCallback

      public void setInternalCallback(Consumer<REPLJob.JobEvent> internalCallback)
      For internal purposes only. Do not use.
      Parameters:
      internalCallback - For internal purposes only.
    • getInternalCallback

      public Consumer<REPLJob.JobEvent> getInternalCallback()
      For internal purposes only. Do not use.
      Returns:
      The internal callback.
    • getInputs

      public List<Serializable> getInputs()
      Gets the list of the job's inputs.
      Returns:
      The job's input as an unmodifiable list.
    • getResults

      public List<REPLJob.InputResult> getResults()
      Gets the list of the job's results.
      Returns:
      The job's results as an unmodifiable list.
    • getStateFile

      public File getStateFile()
      Get the state file of this job.
      Returns:
      The state file of this job.
    • getJobLog

      public List<REPLLogEntry> getJobLog()
      Get the job's private log, which contains messages logged with info(Object...) and similar methods.
      Returns:
      The job's private log.
    • getFuture

      Returns a future that you can wait on. It will be completed as soon as the job has finished.
      Returns:
      The future, or null if the job has not yet been started.
    • getResumedKey

      public String getResumedKey()
      Gets the key of the job which was resumed with this instance.
      Returns:
      The previous key, or null if this job did not resume another one.
    • getCreatedTimestamp

      public Instant getCreatedTimestamp()
      Gets the time at which this instance was created. This is not the start time, which you can instead determine from getProgress().
      Returns:
      The time of the job's instantiation.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getLastLogEntry

      public REPLLogEntry getLastLogEntry()
      Returns the latest entry from the job's private log.
      Returns:
      The latest log entry.
    • trace

      public REPLLogEntry trace(Object... args)
      Logs a message with log level TRACE to the global REPL log, as well as the job's private persistent log.
      Parameters:
      args - The log message.
      Returns:
      The log entry which has been persisted to the logs.
    • debug

      public REPLLogEntry debug(Object... args)
      Logs a message with log level DEBUG to the global REPL log, as well as the job's private persistent log.
      Parameters:
      args - The log message.
      Returns:
      The log entry which has been persisted to the logs.
    • info

      public REPLLogEntry info(Object... args)
      Logs a message with log level INFO to the global REPL log, as well as the job's private persistent log.
      Parameters:
      args - The log message.
      Returns:
      The log entry which has been persisted to the logs.
    • warn

      public REPLLogEntry warn(Object... args)
      Logs a message with log level WARN to the global REPL log, as well as the job's private persistent log.
      Parameters:
      args - The log message.
      Returns:
      The log entry which has been persisted to the logs.
    • error

      public REPLLogEntry error(Object... args)
      Logs a message with log level ERROR to the global REPL log, as well as the job's private persistent log.
      Parameters:
      args - The log message.
      Returns:
      The log entry which has been persisted to the logs.
    • log

      public REPLLogEntry log(Object... args)
      Logs a message with log level INFO to the global REPL log, as well as the job's private persistent log.
      Parameters:
      args - The log message.
      Returns:
      The log entry which has been persisted to the logs.
    • log

      public void log(REPLLogEntry entry)
      Logs a given message to the global REPL log, as well as the job's private persistent log.
      Parameters:
      entry - The log message.
    • log

      public void log(REPLLogEntry entry, Set<REPLLog.LOG_TARGETS> targets, PrintStream... streams)
      Logs a given message to the global REPL log, as well as the job's private persistent log.
      Parameters:
      entry - The log message.
      targets - The log targets. The job's internal log is always implicitly a target.
      streams - Additional PrintStreams that will receive this message.