public class MongoDbAccessMetadataImpl extends MongoDbAccess
Constructor and Description |
---|
MongoDbAccessMetadataImpl(com.mongodb.MongoClient mongoClient,
String dbname,
boolean recreate,
ElasticsearchAccessMetadata esClient,
List<Integer> tenants) |
Modifier and Type | Method and Description |
---|---|
void |
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 !
|
ElasticsearchAccessMetadata |
getEsClient() |
String |
getInfo()
Get information on a Database
|
static com.mongodb.MongoClientOptions |
getMongoClientOptions() |
static long |
getObjectGroupSize() |
static long |
getUnitSize() |
checkConnection, close, createMongoClient, getMongoAdmin, getMongoClient, getMongoDatabase, setDatabase, setMongoAdmin, setMongoClient, setMongoDatabase
public MongoDbAccessMetadataImpl(com.mongodb.MongoClient mongoClient, String dbname, boolean recreate, ElasticsearchAccessMetadata esClient, List<Integer> tenants)
mongoClient
- MongoClientdbname
- MongoDB database namerecreate
- True to recreate the indexesClient
- Elasticsearch clienttenants
- the tenant listpublic static com.mongodb.MongoClientOptions getMongoClientOptions()
public String getInfo()
DatabaseConnection
getInfo
in interface DatabaseConnection
getInfo
in class MongoDbAccess
public static long getUnitSize()
public static long getObjectGroupSize()
public ElasticsearchAccessMetadata getEsClient()
public void deleteUnitByTenant(Integer... tenantIds) throws DatabaseException
tenantIds
- the list of tenantsDatabaseException
- thrown when error on deletepublic void deleteObjectGroupByTenant(Integer... tenantIds) throws DatabaseException
tenantIds
- the list of tenantsDatabaseException
- thrown when error on deleteCopyright © 2019 Vitam. All rights reserved.