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
ConstructorDescriptionMongoDbAccessMetadataImpl
(com.mongodb.client.MongoClient mongoClient, String dbname, boolean recreate, ElasticsearchAccessMetadata esClient, MetadataCollections unitCollection, MetadataCollections objectCollection) -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteObjectGroupByTenant
(Integer... tenantIds) Delete Object Group metadata by Tenant Not check, test feature !void
deleteUnitByTenant
(Integer... tenantIds) Delete Unit metadata by tenant Not check, test feature !getInfo()
Get information on a Databasestatic long
static long
Methods 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:DatabaseConnection
Get information on a Database- Specified by:
getInfo
in interfaceDatabaseConnection
- Overrides:
getInfo
in 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
-