@Test public void returnsMultipleNamespacesIfNeeded() { initializeLog(NAMESPACE_1, SEQUENCE_ID_1); initializeLog(NAMESPACE_1, SEQUENCE_ID_2); initializeLog(NAMESPACE_2, SEQUENCE_ID_1); initializeLog(NAMESPACE_2, SEQUENCE_ID_2); assertThat(namespaceLoader.getAllPersistedNamespaces()).containsExactlyInAnyOrder(NAMESPACE_1, NAMESPACE_2); }
@Override public Set<Client> getAllPersistedNamespaces() { return jdbi.withExtension(SqlitePaxosStateLog.Queries.class, SqlitePaxosStateLog.Queries::getAllNamespaces) .stream() .map(Client::of) .collect(Collectors.toSet()); }
SqliteNamespaceLoader implements PersistentNamespaceLoader { @Override public Set<Client> getAllPersistedNamespaces() { return jdbi.withExtension(SqlitePaxosStateLog.Queries.class, SqlitePaxosStateLog.Queries::getAllNamespaces) .stream() .map(Client::of) .collect(Collectors.toSet()); } }
SqliteNamespaceLoader implements PersistentNamespaceLoader { @Override public Set<Client> getAllPersistedNamespaces() { return jdbi.withExtension(SqlitePaxosStateLog.Queries.class, SqlitePaxosStateLog.Queries::getAllNamespaces) .stream() .map(Client::of) .collect(Collectors.toSet()); } private  SqliteNamespaceLoader(Jdbi jdbi); }
SqliteNamespaceLoader implements PersistentNamespaceLoader { @Override public Set<Client> getAllPersistedNamespaces() { return jdbi.withExtension(SqlitePaxosStateLog.Queries.class, SqlitePaxosStateLog.Queries::getAllNamespaces) .stream() .map(Client::of) .collect(Collectors.toSet()); } private  SqliteNamespaceLoader(Jdbi jdbi); static PersistentNamespaceLoader create(DataSource dataSource); @Override Set<Client> getAllPersistedNamespaces(); }
SqliteNamespaceLoader implements PersistentNamespaceLoader { @Override public Set<Client> getAllPersistedNamespaces() { return jdbi.withExtension(SqlitePaxosStateLog.Queries.class, SqlitePaxosStateLog.Queries::getAllNamespaces) .stream() .map(Client::of) .collect(Collectors.toSet()); } private  SqliteNamespaceLoader(Jdbi jdbi); static PersistentNamespaceLoader create(DataSource dataSource); @Override Set<Client> getAllPersistedNamespaces();  }