JcrRepository.this),
binaryGcInitialTimeInMillis,
binaryGcIntervalInMillis,
TimeUnit.MILLISECONDS));
DocumentOptimization optConfig = config.getDocumentOptimization();
if (optConfig.isEnabled()) {
warn(JcrI18n.enablingDocumentOptimization, name());
threadPoolName = optConfig.getThreadPoolName();
long optInitialTimeInMillis = determineInitialDelay(optConfig.getInitialTimeExpression());
long optIntervalInHours = optConfig.getIntervalInHours();
int targetCount = optConfig.getChildCountTarget();
int tolerance = optConfig.getChildCountTolerance();
assert optInitialTimeInMillis >= 0;
long optIntervalInMillis = TimeUnit.MILLISECONDS.convert(optIntervalInHours, TimeUnit.HOURS);
ScheduledExecutorService optService = this.context.getScheduledThreadPool(threadPoolName);
OptimizationTask optTask = new OptimizationTask(JcrRepository.this, targetCount, tolerance);
backgroundProcesses.add(optService.scheduleAtFixedRate(optTask, optInitialTimeInMillis, optIntervalInMillis,