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
public class MongoDbAccessMetadataImpl extends MongoDbAccess
MongoDbAccess Implement for Admin
-
-
Constructor Summary
Constructors Constructor Description MongoDbAccessMetadataImpl(com.mongodb.client.MongoClient mongoClient, java.lang.String dbname, boolean recreate, ElasticsearchAccessMetadata esClient, MetadataCollections unitCollection, MetadataCollections objectCollection)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteObjectGroupByTenant(java.lang.Integer... tenantIds)Delete Object Group metadata by Tenant Not check, test feature !voiddeleteUnitByTenant(java.lang.Integer... tenantIds)Delete Unit metadata by tenant Not check, test feature !ElasticsearchAccessMetadatagetEsClient()java.lang.StringgetInfo()Get information on a Databasestatic longgetObjectGroupSize()static longgetUnitSize()-
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 Detail
-
MongoDbAccessMetadataImpl
public MongoDbAccessMetadataImpl(com.mongodb.client.MongoClient mongoClient, java.lang.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 Detail
-
getInfo
public java.lang.String 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
public ElasticsearchAccessMetadata getEsClient()
- Returns:
- the Elasticsearch Acess Metadata client
-
deleteUnitByTenant
public void deleteUnitByTenant(java.lang.Integer... tenantIds) throws MetaDataExecutionExceptionDelete Unit metadata by tenant Not check, test feature !- Parameters:
tenantIds- the list of tenants- Throws:
MetaDataExecutionException
-
deleteObjectGroupByTenant
public void deleteObjectGroupByTenant(java.lang.Integer... tenantIds) throws MetaDataExecutionExceptionDelete Object Group metadata by Tenant Not check, test feature !- Parameters:
tenantIds- the list of tenants- Throws:
MetaDataExecutionException
-
-