@Test public void shouldNotDoAnythingIfNoActivatableJobs() { final DirectBuffer type = wrapString("test"); createAndActivateJobRecord(1, newJobRecord().setType(type)); jobState.create(256L, newJobRecord().setType("other")); final List<Long> jobKeys = getActivatableKeys(type); assertThat(jobKeys).isEmpty(); }
public void create(final long key, final JobRecord record) { final DirectBuffer type = record.getTypeBuffer(); createJob(key, record, type); metrics.jobCreated(record.getType()); }
JobState { public void create(final long key, final JobRecord record) { final DirectBuffer type = record.getTypeBuffer(); createJob(key, record, type); metrics.jobCreated(record.getType()); } }
JobState { public void create(final long key, final JobRecord record) { final DirectBuffer type = record.getTypeBuffer(); createJob(key, record, type); metrics.jobCreated(record.getType()); } JobState(
      final ZeebeDb<ZbColumnFamilies> zeebeDb, final DbContext dbContext, final int partitionId); }
JobState { public void create(final long key, final JobRecord record) { final DirectBuffer type = record.getTypeBuffer(); createJob(key, record, type); metrics.jobCreated(record.getType()); } JobState(
      final ZeebeDb<ZbColumnFamilies> zeebeDb, final DbContext dbContext, final int partitionId); void create(final long key, final JobRecord record); void activate(final long key, final JobRecord record); void timeout(final long key, final JobRecord record); void complete(final long key, final JobRecord record); void cancel(final long key, final JobRecord record); void disable(final long key, final JobRecord record); void throwError(final long key, final JobRecord updatedValue); void delete(final long key, final JobRecord record); void fail(final long key, final JobRecord updatedValue); void resolve(final long key, final JobRecord updatedValue); void forEachTimedOutEntry(
      final long upperBound, final BiFunction<Long, JobRecord, Boolean> callback); boolean exists(final long jobKey); State getState(final long key); boolean isInState(final long key, final State state); void forEachActivatableJobs(
      final DirectBuffer type, final BiFunction<Long, JobRecord, Boolean> callback); JobRecord updateJobRetries(final long jobKey, final int retries); JobRecord getJob(final long key); void setJobsAvailableCallback(final Consumer<String> onJobsAvailableCallback); }
JobState { public void create(final long key, final JobRecord record) { final DirectBuffer type = record.getTypeBuffer(); createJob(key, record, type); metrics.jobCreated(record.getType()); } JobState(
      final ZeebeDb<ZbColumnFamilies> zeebeDb, final DbContext dbContext, final int partitionId); void create(final long key, final JobRecord record); void activate(final long key, final JobRecord record); void timeout(final long key, final JobRecord record); void complete(final long key, final JobRecord record); void cancel(final long key, final JobRecord record); void disable(final long key, final JobRecord record); void throwError(final long key, final JobRecord updatedValue); void delete(final long key, final JobRecord record); void fail(final long key, final JobRecord updatedValue); void resolve(final long key, final JobRecord updatedValue); void forEachTimedOutEntry(
      final long upperBound, final BiFunction<Long, JobRecord, Boolean> callback); boolean exists(final long jobKey); State getState(final long key); boolean isInState(final long key, final State state); void forEachActivatableJobs(
      final DirectBuffer type, final BiFunction<Long, JobRecord, Boolean> callback); JobRecord updateJobRetries(final long jobKey, final int retries); JobRecord getJob(final long key); void setJobsAvailableCallback(final Consumer<String> onJobsAvailableCallback);  }