Interface JobState

All Known Subinterfaces:
MutableJobState
All Known Implementing Classes:
DbJobState

public interface JobState
  • Method Details

    • forEachTimedOutEntry

      JobState.DeadlineIndex forEachTimedOutEntry(long executionTimestamp, JobState.DeadlineIndex startAt, BiPredicate<Long,JobRecord> callback)
      Loops over all timed-out job entries and applies the provided callback.
      Parameters:
      executionTimestamp - Timestamp against which it's determined whether the deadline has expired
      startAt - Index used to start the iteration at; looping starts at the beginning when startAt is null
      callback - A callback method to be applied to each job entry. It must return a boolean that when true allows the loop to continue, or when false stops iteration.
      Returns:
      The last visited index where the iteration has stopped because the callback method returned false or null if it was not the case.
    • exists

      boolean exists(long jobKey)
    • getState

      JobState.State getState(long key)
    • isInState

      boolean isInState(long key, JobState.State state)
    • forEachActivatableJobs

      void forEachActivatableJobs(org.agrona.DirectBuffer type, List<String> tenantIds, BiFunction<Long,JobRecord,Boolean> callback)
    • getJob

      JobRecord getJob(long key)
    • getJob

      JobRecord getJob(long key, Map<String,Object> authorizations)
    • jobDeadlineExists

      boolean jobDeadlineExists(long jobKey, long deadline)
    • findBackedOffJobs

      long findBackedOffJobs(long timestamp, BiPredicate<Long,JobRecord> callback)