@Test public void syncInitTimestampServiceSynchronous() { TimestampService timestampService = factory.createManagedTimestampService(null, Optional.empty(), false); assertThat(timestampService.isInitialized()).isTrue(); assertThat(timestampService.getFreshTimestamp()).isEqualTo(1L); }
@Override public ManagedTimestampService createManagedTimestampService( KeyValueService rawKvs, Optional<TableReference> unused, boolean initializeAsync) { if (initializeAsync) { log.warn("Asynchronous initialization not implemented, will initialize synchronously."); } AtlasDbVersion.ensureVersionReported(); return new InMemoryTimestampService(); }
InMemoryAtlasDbFactory implements AtlasDbFactory { @Override public ManagedTimestampService createManagedTimestampService( KeyValueService rawKvs, Optional<TableReference> unused, boolean initializeAsync) { if (initializeAsync) { log.warn("Asynchronous initialization not implemented, will initialize synchronously."); } AtlasDbVersion.ensureVersionReported(); return new InMemoryTimestampService(); } }
InMemoryAtlasDbFactory implements AtlasDbFactory { @Override public ManagedTimestampService createManagedTimestampService( KeyValueService rawKvs, Optional<TableReference> unused, boolean initializeAsync) { if (initializeAsync) { log.warn("Asynchronous initialization not implemented, will initialize synchronously."); } AtlasDbVersion.ensureVersionReported(); return new InMemoryTimestampService(); }  }
InMemoryAtlasDbFactory implements AtlasDbFactory { @Override public ManagedTimestampService createManagedTimestampService( KeyValueService rawKvs, Optional<TableReference> unused, boolean initializeAsync) { if (initializeAsync) { log.warn("Asynchronous initialization not implemented, will initialize synchronously."); } AtlasDbVersion.ensureVersionReported(); return new InMemoryTimestampService(); }  @Override String getType(); @Override InMemoryKeyValueService createRawKeyValueService(
            MetricsManager metricsManager,
            KeyValueServiceConfig config,
            Supplier<Optional<KeyValueServiceRuntimeConfig>> runtimeConfig,
            Optional<LeaderConfig> leaderConfig,
            Optional<String> unused,
            LongSupplier unusedLongSupplier,
            boolean initializeAsync); @Override ManagedTimestampService createManagedTimestampService(
            KeyValueService rawKvs,
            Optional<TableReference> unused,
            boolean initializeAsync); }
InMemoryAtlasDbFactory implements AtlasDbFactory { @Override public ManagedTimestampService createManagedTimestampService( KeyValueService rawKvs, Optional<TableReference> unused, boolean initializeAsync) { if (initializeAsync) { log.warn("Asynchronous initialization not implemented, will initialize synchronously."); } AtlasDbVersion.ensureVersionReported(); return new InMemoryTimestampService(); }  @Override String getType(); @Override InMemoryKeyValueService createRawKeyValueService(
            MetricsManager metricsManager,
            KeyValueServiceConfig config,
            Supplier<Optional<KeyValueServiceRuntimeConfig>> runtimeConfig,
            Optional<LeaderConfig> leaderConfig,
            Optional<String> unused,
            LongSupplier unusedLongSupplier,
            boolean initializeAsync); @Override ManagedTimestampService createManagedTimestampService(
            KeyValueService rawKvs,
            Optional<TableReference> unused,
            boolean initializeAsync);  }