Class VitamRepositoryFactory
- java.lang.Object
-
- fr.gouv.vitam.common.database.api.VitamRepositoryFactory
-
- All Implemented Interfaces:
VitamRepositoryProvider
public class VitamRepositoryFactory extends java.lang.Object implements VitamRepositoryProvider
Reconstruction instance for instantiating mongoDB and elasticsearch repository.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VitamRepositoryFactory
get()
get Thread-Safe instance instance.VitamElasticsearchRepository
getVitamESRepository(VitamCollection collection, ElasticsearchIndexAliasResolver elasticsearchIndexAliasResolver)
VitamMongoRepository
getVitamMongoRepository(VitamCollection collection)
-
-
-
Method Detail
-
get
public static VitamRepositoryFactory get()
get Thread-Safe instance instance.- Returns:
- current instance of VitamRepositoryFactory, create if null
-
getVitamMongoRepository
public VitamMongoRepository getVitamMongoRepository(VitamCollection collection)
- 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
-
-