Class MongoDbAccessMetadataImpl
java.lang.Object
fr.gouv.vitam.common.database.server.mongodb.MongoDbAccess
fr.gouv.vitam.metadata.core.database.collections.MongoDbAccessMetadataImpl
- All Implemented Interfaces:
DatabaseConnection
MongoDbAccess Implement for Admin
-
Constructor Summary
ConstructorsConstructorDescriptionMongoDbAccessMetadataImpl(com.mongodb.client.MongoClient mongoClient, String dbname, boolean recreate, ElasticsearchAccessMetadata esClient, MetadataCollections unitCollection, MetadataCollections objectCollection) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteObjectGroupByTenant(Integer... tenantIds) Delete Object Group metadata by Tenant Not check, test feature !voiddeleteUnitByTenant(Integer... tenantIds) Delete Unit metadata by tenant Not check, test feature !getInfo()Get information on a Databasestatic longstatic longMethods inherited from class fr.gouv.vitam.common.database.server.mongodb.MongoDbAccess
checkConnection, close, createMongoClient, createMongoClient, getMongoAdmin, getMongoClient, getMongoClientSettingsBuilder, getMongoClientSettingsBuilder, getMongoDatabase, setDatabase, setMongoAdmin, setMongoClient, setMongoDatabase
-
Constructor Details
-
MongoDbAccessMetadataImpl
public MongoDbAccessMetadataImpl(com.mongodb.client.MongoClient mongoClient, String dbname, boolean recreate, ElasticsearchAccessMetadata esClient, MetadataCollections unitCollection, MetadataCollections objectCollection) - Parameters:
mongoClient- MongoClientdbname- MongoDB database namerecreate- True to recreate the indexesClient- Elasticsearch clientunitCollection-objectCollection-
-
-
Method Details
-
getInfo
Description copied from interface:DatabaseConnectionGet information on a Database- Specified by:
getInfoin interfaceDatabaseConnection- Overrides:
getInfoin classMongoDbAccess- Returns:
- information on the database
-
getUnitSize
public static long getUnitSize()- Returns:
- the current number of Unit
-
getObjectGroupSize
public static long getObjectGroupSize()- Returns:
- the current number of ObjectGroup
-
getEsClient
- Returns:
- the Elasticsearch Acess Metadata client
-
deleteUnitByTenant
Delete Unit metadata by tenant Not check, test feature !- Parameters:
tenantIds- the list of tenants- Throws:
MetaDataExecutionException
-
deleteObjectGroupByTenant
Delete Object Group metadata by Tenant Not check, test feature !- Parameters:
tenantIds- the list of tenants- Throws:
MetaDataExecutionException
-