use of org.icij.datashare.db.RepositoryFactoryImpl in project datashare by ICIJ.
the class BatchDownloadMode method configure.
@Override
protected void configure() {
super.configure();
String batchQueueType = propertiesProvider.get("batchQueueType").orElse("org.icij.datashare.extract.MemoryBlockingQueue");
bind(TaskManager.class).toInstance(new TaskManagerRedis(propertiesProvider, getBlockingQueue(propertiesProvider, batchQueueType, "ds:batchdownload:queue")));
RepositoryFactoryImpl repositoryFactory = new RepositoryFactoryImpl(propertiesProvider);
bind(BatchSearchRepository.class).toInstance(repositoryFactory.createBatchSearchRepository());
bind(ApiKeyRepository.class).toInstance(repositoryFactory.createApiKeyRepository());
repositoryFactory.initDatabase();
}
use of org.icij.datashare.db.RepositoryFactoryImpl in project datashare by ICIJ.
the class CommonMode method configurePersistence.
void configurePersistence() {
RepositoryFactoryImpl repositoryFactory = new RepositoryFactoryImpl(propertiesProvider);
bind(Repository.class).toInstance(repositoryFactory.createRepository());
bind(ApiKeyRepository.class).toInstance(repositoryFactory.createApiKeyRepository());
bind(BatchSearchRepository.class).toInstance(repositoryFactory.createBatchSearchRepository());
repositoryFactory.initDatabase();
}
use of org.icij.datashare.db.RepositoryFactoryImpl in project datashare by ICIJ.
the class CliMode method configure.
@Override
protected void configure() {
super.configure();
bind(TaskManager.class).toInstance(new TaskManagerMemory(propertiesProvider));
RepositoryFactoryImpl repositoryFactory = new RepositoryFactoryImpl(propertiesProvider);
bind(BatchSearchRepository.class).toInstance(repositoryFactory.createBatchSearchRepository());
bind(ApiKeyRepository.class).toInstance(repositoryFactory.createApiKeyRepository());
repositoryFactory.initDatabase();
}
Aggregations