Class VitamRepositoryFactory
java.lang.Object
fr.gouv.vitam.common.database.api.VitamRepositoryFactory
- All Implemented Interfaces:
VitamRepositoryProvider
Reconstruction instance for instantiating mongoDB and elasticsearch repository.
-
Method Summary
Modifier and TypeMethodDescriptionstatic VitamRepositoryFactory
get()
get Thread-Safe instance instance.getVitamESRepository
(VitamCollection collection, ElasticsearchIndexAliasResolver elasticsearchIndexAliasResolver) getVitamMongoRepository
(VitamCollection collection)
-
Method Details
-
get
get Thread-Safe instance instance.- Returns:
- current instance of VitamRepositoryFactory, create if null
-
getVitamMongoRepository
- Specified by:
getVitamMongoRepository
in interfaceVitamRepositoryProvider
- Parameters:
collection
- VitamCollection- Returns:
- VitamMongoRepository
-
getVitamESRepository
public VitamElasticsearchRepository getVitamESRepository(VitamCollection collection, ElasticsearchIndexAliasResolver elasticsearchIndexAliasResolver) - Specified by:
getVitamESRepository
in interfaceVitamRepositoryProvider
- Parameters:
collection
- VitamCollection- Returns:
- VitamElasticsearchRepository
-