@Test public void handlesMultitenancyCorrectly() { CoordinationService<InternalSchemaMetadata> otherService = mock(CoordinationService.class); MetricsManager otherManager = MetricsManagers.createForTests(); TimestampService otherTimestampService = mock(TimestampService.class); MetadataCoordinationServiceMetrics.registerMetrics(otherManager, otherService, otherTimestampService); when(otherService.getLastKnownLocalValue()).thenReturn( Optional.of(ValueAndBound.of(Optional.empty(), TIMESTAMP_2))); assertThat(getGauge(metricsManager, AtlasDbMetricNames.COORDINATION_LAST_VALID_BOUND).getValue()) .isEqualTo(TIMESTAMP_1); assertThat(getGauge(otherManager, AtlasDbMetricNames.COORDINATION_LAST_VALID_BOUND).getValue()) .isEqualTo(TIMESTAMP_2); }
public static void registerMetrics( MetricsManager metricsManager, CoordinationService<InternalSchemaMetadata> metadataCoordinationService, TimestampService timestamp) { registerValidityBoundMetric(metricsManager, metadataCoordinationService); registerTransactionsSchemaVersionMetrics(metricsManager, metadataCoordinationService, timestamp); }
MetadataCoordinationServiceMetrics { public static void registerMetrics( MetricsManager metricsManager, CoordinationService<InternalSchemaMetadata> metadataCoordinationService, TimestampService timestamp) { registerValidityBoundMetric(metricsManager, metadataCoordinationService); registerTransactionsSchemaVersionMetrics(metricsManager, metadataCoordinationService, timestamp); } }
MetadataCoordinationServiceMetrics { public static void registerMetrics( MetricsManager metricsManager, CoordinationService<InternalSchemaMetadata> metadataCoordinationService, TimestampService timestamp) { registerValidityBoundMetric(metricsManager, metadataCoordinationService); registerTransactionsSchemaVersionMetrics(metricsManager, metadataCoordinationService, timestamp); } private  MetadataCoordinationServiceMetrics(); }
MetadataCoordinationServiceMetrics { public static void registerMetrics( MetricsManager metricsManager, CoordinationService<InternalSchemaMetadata> metadataCoordinationService, TimestampService timestamp) { registerValidityBoundMetric(metricsManager, metadataCoordinationService); registerTransactionsSchemaVersionMetrics(metricsManager, metadataCoordinationService, timestamp); } private  MetadataCoordinationServiceMetrics(); static void registerMetrics(
            MetricsManager metricsManager,
            CoordinationService<InternalSchemaMetadata> metadataCoordinationService,
            TimestampService timestamp); }
MetadataCoordinationServiceMetrics { public static void registerMetrics( MetricsManager metricsManager, CoordinationService<InternalSchemaMetadata> metadataCoordinationService, TimestampService timestamp) { registerValidityBoundMetric(metricsManager, metadataCoordinationService); registerTransactionsSchemaVersionMetrics(metricsManager, metadataCoordinationService, timestamp); } private  MetadataCoordinationServiceMetrics(); static void registerMetrics(
            MetricsManager metricsManager,
            CoordinationService<InternalSchemaMetadata> metadataCoordinationService,
            TimestampService timestamp);  }