use of org.projectnessie.quarkus.providers.StoreType.Literal in project nessie by projectnessie.
the class DatabaseAdapterProvider method produceDatabaseAdapter.
@Produces
@Singleton
@Startup
public DatabaseAdapter produceDatabaseAdapter() {
VersionStoreType versionStoreType = storeConfig.getVersionStoreType();
LOGGER.info("Using {} Version store", versionStoreType);
TableCommitMetaStoreWorker storeWorker = new TableCommitMetaStoreWorker();
DatabaseAdapter databaseAdapter = databaseAdapterBuilder.select(new Literal(versionStoreType)).get().newDatabaseAdapter(new GenericContentVariantSupplier<>(storeWorker));
databaseAdapter.initializeRepo(serverConfig.getDefaultBranch());
if (storeConfig.isTracingEnabled()) {
databaseAdapter = new TracingDatabaseAdapter(databaseAdapter);
}
return databaseAdapter;
}
Aggregations