Class WorkerTtlCheckJob

java.lang.Object
com.fishlib.io.sched.Job
com.fishlib.io.sched.TimedJob
com.illumon.iris.db.tables.remotequery.keepalive.WorkerTtlCheckJob
All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable

public class WorkerTtlCheckJob extends com.fishlib.io.sched.TimedJob
A timed job that examines a worker for liveness. If the worker has an expired TTL, then terminate it using the supplied callback.
  • Constructor Details

    • WorkerTtlCheckJob

      public WorkerTtlCheckJob(com.fishlib.io.logger.Logger log, Supplier<SafeCloseable> lockAcquire, Supplier<KeepAliveWorker> workerSupplier, Consumer<SafeCloseable> terminationCallback)
      Parameters:
      log - the log
      lockAcquire - take any necessary lock, and return a SafeCloseable that can be used to release the lock. Note: The closeable may be closed more than once!
      workerSupplier - the supplier of the worker this job is managing
      terminationCallback - a method to terminate the worker when it has exceeded its TTL
  • Method Details