@Test public void testReturnsOriginalForNotSelfManagedJobs() throws Exception { property.set(toJson(FALLBACK_BUDGET_1)); ArchaiusEffectiveJobDisruptionBudgetResolver resolver = new ArchaiusEffectiveJobDisruptionBudgetResolver(repository, sanitizer); assertThat(resolver.resolve(JOB_NOT_SELF_MANAGED)).isEqualTo(JOB_NOT_SELF_MANAGED.getJobDescriptor().getDisruptionBudget()); }
@Override public DisruptionBudget resolve(Job<?> job) { return DisruptionBudgetFunctions.isSelfManaged(job) ? disruptionBudgetRef.get() : job.getJobDescriptor().getDisruptionBudget(); }
ArchaiusEffectiveJobDisruptionBudgetResolver implements EffectiveJobDisruptionBudgetResolver { @Override public DisruptionBudget resolve(Job<?> job) { return DisruptionBudgetFunctions.isSelfManaged(job) ? disruptionBudgetRef.get() : job.getJobDescriptor().getDisruptionBudget(); } }
ArchaiusEffectiveJobDisruptionBudgetResolver implements EffectiveJobDisruptionBudgetResolver { @Override public DisruptionBudget resolve(Job<?> job) { return DisruptionBudgetFunctions.isSelfManaged(job) ? disruptionBudgetRef.get() : job.getJobDescriptor().getDisruptionBudget(); } @Inject  ArchaiusEffectiveJobDisruptionBudgetResolver(PropertyRepository repository,
                                                        @Named(JOB_STRICT_SANITIZER) EntitySanitizer sanitizer); }
ArchaiusEffectiveJobDisruptionBudgetResolver implements EffectiveJobDisruptionBudgetResolver { @Override public DisruptionBudget resolve(Job<?> job) { return DisruptionBudgetFunctions.isSelfManaged(job) ? disruptionBudgetRef.get() : job.getJobDescriptor().getDisruptionBudget(); } @Inject  ArchaiusEffectiveJobDisruptionBudgetResolver(PropertyRepository repository,
                                                        @Named(JOB_STRICT_SANITIZER) EntitySanitizer sanitizer); @PreDestroy void shutdown(); @Override DisruptionBudget resolve(Job<?> job); }
ArchaiusEffectiveJobDisruptionBudgetResolver implements EffectiveJobDisruptionBudgetResolver { @Override public DisruptionBudget resolve(Job<?> job) { return DisruptionBudgetFunctions.isSelfManaged(job) ? disruptionBudgetRef.get() : job.getJobDescriptor().getDisruptionBudget(); } @Inject  ArchaiusEffectiveJobDisruptionBudgetResolver(PropertyRepository repository,
                                                        @Named(JOB_STRICT_SANITIZER) EntitySanitizer sanitizer); @PreDestroy void shutdown(); @Override DisruptionBudget resolve(Job<?> job); static final String PROPERTY_KEY; }