Skip to content

Commit

Permalink
Remove InMemoryStore option from AerieAppDriver
Browse files Browse the repository at this point in the history
The InMemory versions of the repositories are either stubs or only defined enough to be used in testing. Therefore, we should remove the ability to initiate Aerie using an InMemoryStore.

- Remove classes that are unused as of this pruning
  • Loading branch information
Mythicaeda committed Apr 18, 2023
1 parent 6bab995 commit c082e8c
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 139 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import gov.nasa.jpl.aerie.merlin.server.config.AppConfiguration;
import gov.nasa.jpl.aerie.merlin.server.config.InMemoryStore;
import gov.nasa.jpl.aerie.merlin.server.config.PostgresStore;
import gov.nasa.jpl.aerie.merlin.server.config.Store;
import gov.nasa.jpl.aerie.merlin.server.http.LocalAppExceptionBindings;
import gov.nasa.jpl.aerie.merlin.server.http.MerlinBindings;
import gov.nasa.jpl.aerie.merlin.server.http.MissionModelRepositoryExceptionBindings;
import gov.nasa.jpl.aerie.merlin.server.mocks.InMemoryMissionModelRepository;
import gov.nasa.jpl.aerie.merlin.server.mocks.InMemoryPlanRepository;
import gov.nasa.jpl.aerie.merlin.server.remotes.InMemoryResultsCellRepository;
import gov.nasa.jpl.aerie.merlin.server.remotes.MissionModelRepository;
import gov.nasa.jpl.aerie.merlin.server.remotes.PlanRepository;
import gov.nasa.jpl.aerie.merlin.server.remotes.ResultsCellRepository;
Expand Down Expand Up @@ -125,13 +121,6 @@ private static Stores loadStores(final AppConfiguration config) {
new PostgresPlanRepository(hikariDataSource),
new PostgresMissionModelRepository(hikariDataSource),
new PostgresResultsCellRepository(hikariDataSource));
} else if (store instanceof InMemoryStore) {
final var inMemoryPlanRepository = new InMemoryPlanRepository();
return new Stores(
inMemoryPlanRepository,
new InMemoryMissionModelRepository(),
new InMemoryResultsCellRepository(inMemoryPlanRepository));

} else {
throw new UnexpectedSubtypeError(Store.class, store);
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package gov.nasa.jpl.aerie.merlin.server.config;

public sealed interface Store
permits PostgresStore, InMemoryStore
permits PostgresStore
{}

This file was deleted.

This file was deleted.

0 comments on commit c082e8c

Please sign in to comment.