private CoordinationService<InternalSchemaMetadata> getSchemaMetadataCoordinationService( MetricsManager metricsManager, LockAndTimestampServices lockAndTimestampServices, KeyValueService keyValueService) { @SuppressWarnings("unchecked") // Coordination service clearly has this type. CoordinationService<InternalSchemaMetadata> metadataCoordinationService = AtlasDbMetrics.instrument( metricsManager.getRegistry(), CoordinationService.class, CoordinationServices.createDefault( keyValueService, lockAndTimestampServices.timestamp(), config().initializeAsync())); MetadataCoordinationServiceMetrics.registerMetrics(metricsManager, metadataCoordinationService); return metadataCoordinationService; }
config().keyValueService(), Suppliers.compose(AtlasDbRuntimeConfig::keyValueService, runtimeConfigSupplier::get), config().leader(), config().namespace(), Optional.empty(), config().initializeAsync(), adapter); SimpleTimeDuration.of(config().getDefaultLockTimeoutSeconds(), TimeUnit.SECONDS)); config(), runtimeConfigSupplier, registrar(), KvsProfilingLogger.setSlowLogThresholdMillis(config().getKvsSlowLogThresholdMillis()); if (!config().targetedSweep().enableSweepQueueWrites()) { kvs = SweepStatsKeyValueService.create(kvs, new TimelockTimestampServiceAdapter(lockAndTimestampServices.timelock()), keyValueService, schemas(), config().initializeAsync()); PersistentLockService persistentLockService = createAndRegisterPersistentLockService( keyValueService, registrar(), config().initializeAsync()); new DefaultCleanerBuilder(keyValueService, lockAndTimestampServices.timelock(), ImmutableList.of(follower), transactionService) .setBackgroundScrubAggressively(config().backgroundScrubAggressively()) .setBackgroundScrubBatchSize(config().getBackgroundScrubBatchSize()) .setBackgroundScrubFrequencyMillis(config().getBackgroundScrubFrequencyMillis()) .setBackgroundScrubThreads(config().getBackgroundScrubThreads()) .setPunchIntervalMillis(config().getPunchIntervalMillis()) .setTransactionReadTimeout(config().getTransactionReadTimeoutMillis())
private CoordinationService<InternalSchemaMetadata> getSchemaMetadataCoordinationService( MetricsManager metricsManager, LockAndTimestampServices lockAndTimestampServices, KeyValueService keyValueService) { @SuppressWarnings("unchecked") // Coordination service clearly has this type. CoordinationService<InternalSchemaMetadata> metadataCoordinationService = AtlasDbMetrics.instrument( metricsManager.getRegistry(), CoordinationService.class, CoordinationServices.createDefault( keyValueService, lockAndTimestampServices.timestamp(), config().initializeAsync())); MetadataCoordinationServiceMetrics.registerMetrics(metricsManager, metadataCoordinationService); return metadataCoordinationService; }
config().keyValueService(), Suppliers.compose(AtlasDbRuntimeConfig::keyValueService, runtimeConfigSupplier::get), config().leader(), config().namespace(), Optional.empty(), config().initializeAsync(), adapter); SimpleTimeDuration.of(config().getDefaultLockTimeoutSeconds(), TimeUnit.SECONDS)); config(), runtimeConfigSupplier, registrar(), KvsProfilingLogger.setSlowLogThresholdMillis(config().getKvsSlowLogThresholdMillis()); if (!config().targetedSweep().enableSweepQueueWrites()) { kvs = SweepStatsKeyValueService.create(kvs, new TimelockTimestampServiceAdapter(lockAndTimestampServices.timelock()), keyValueService, schemas(), config().initializeAsync()); PersistentLockService persistentLockService = createAndRegisterPersistentLockService( keyValueService, registrar(), config().initializeAsync()); new DefaultCleanerBuilder(keyValueService, lockAndTimestampServices.timelock(), ImmutableList.of(follower), transactionService) .setBackgroundScrubAggressively(config().backgroundScrubAggressively()) .setBackgroundScrubBatchSize(config().getBackgroundScrubBatchSize()) .setBackgroundScrubFrequencyMillis(config().getBackgroundScrubFrequencyMillis()) .setBackgroundScrubThreads(config().getBackgroundScrubThreads()) .setPunchIntervalMillis(config().getPunchIntervalMillis()) .setTransactionReadTimeout(config().getTransactionReadTimeoutMillis())