use of com.netflix.titus.common.framework.scheduler.model.ScheduleDescriptor in project titus-control-plane by Netflix.
the class BaseGcController method enterActiveMode.
@Activator
public void enterActiveMode() {
ScheduleDescriptor gcScheduleDescriptor = ScheduleDescriptor.newBuilder().withName(name).withDescription(description).withInitialDelay(Duration.ofMillis(controllerConfiguration.getControllerInitialDelayMs())).withInterval(Duration.ofMillis(controllerConfiguration.getControllerIntervalMs())).withTimeout(Duration.ofMillis(controllerConfiguration.getControllerTimeoutMs())).build();
executorService = ExecutorsExt.namedSingleThreadExecutor(name);
schedulerRef = scheduler.schedule(gcScheduleDescriptor, e -> doGc(), executorService);
tokenBucket = Limiters.createInstrumentedFixedIntervalTokenBucket(name + "TokenBucket", tokenBucketConfiguration, currentTokenBucket -> logger.info("Token bucket: {} configuration updated with: {}", name, currentTokenBucket), titusRuntime);
}
Aggregations