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.MongoClient mongoClient, java.lang.String dbname, boolean recreate, ElasticsearchAccessMetadata esClient)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteObjectGroupByTenant(java.lang.Integer... tenantIds)
Delete Object Group metadata by Tenant Not check, test feature !void
deleteUnitByTenant(java.lang.Integer... tenantIds)
Delete Unit metadata by tenant Not check, test feature !ElasticsearchAccessMetadata
getEsClient()
java.lang.String
getInfo()
Get information on a Databasestatic com.mongodb.MongoClientOptions
getMongoClientOptions()
static long
getObjectGroupSize()
static long
getUnitSize()
-
Methods inherited from class fr.gouv.vitam.common.database.server.mongodb.MongoDbAccess
checkConnection, close, createMongoClient, getMongoAdmin, getMongoClient, getMongoDatabase, setDatabase, setMongoAdmin, setMongoClient, setMongoDatabase
-
-
-
-
Constructor Detail
-
MongoDbAccessMetadataImpl
public MongoDbAccessMetadataImpl(com.mongodb.MongoClient mongoClient, java.lang.String dbname, boolean recreate, ElasticsearchAccessMetadata esClient)
- Parameters:
mongoClient
- MongoClientdbname
- MongoDB database namerecreate
- True to recreate the indexesClient
- Elasticsearch client
-
-
Method Detail
-
getMongoClientOptions
public static com.mongodb.MongoClientOptions getMongoClientOptions()
- Returns:
- The MongoCLientOptions to apply to MongoClient
-
getInfo
public java.lang.String 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
public ElasticsearchAccessMetadata getEsClient()
- Returns:
- the Elasticsearch Acess Metadata client
-
deleteUnitByTenant
public void deleteUnitByTenant(java.lang.Integer... tenantIds) throws MetaDataExecutionException
Delete 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 MetaDataExecutionException
Delete Object Group metadata by Tenant Not check, test feature !- Parameters:
tenantIds
- the list of tenants- Throws:
MetaDataExecutionException
-
-