public class GraphComputeServiceImpl extends Object implements GraphComputeService
$_SET, concurrencyLevel, executor, START_DEPTH
Modifier and Type | Method and Description |
---|---|
void |
bulkElasticsearch(MetadataCollections metaDaCollection,
List<org.bson.Document> collection)
Bulk save in elasticsearch
|
void |
bulkElasticsearch(MetadataCollections metaDaCollection,
Set<String> collection)
Bulk save in elasticsearch
|
void |
bulkUpdateMongo(MetadataCollections metaDaCollection,
List<com.mongodb.client.model.WriteModel<org.bson.Document>> collection)
Bulk write in mongodb
|
void |
close() |
GraphComputeResponse |
computeGraph(com.fasterxml.jackson.databind.JsonNode queryDSL)
If workflow of compute graph in progress, do not execute this method
Should be exposed in the API
|
GraphComputeResponse |
computeGraph(MetadataCollections metadataCollections,
Set<String> documentsId,
boolean computeObjectGroupGraph)
Compute graph for unit/got from all parents
|
com.google.common.cache.LoadingCache<String,org.bson.Document> |
getCache() |
static GraphComputeService |
getInstance() |
static GraphComputeService |
initialize(VitamRepositoryProvider vitamRepositoryProvider,
MetaData metaData) |
static GraphComputeService |
initialize(VitamRepositoryProvider vitamRepositoryProvider,
MetaData metaData,
VitamCache<String,org.bson.Document> cache,
List<Integer> tenants) |
boolean |
isInProgress() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
computeGraph, computeObjectGroupGraph, computeObjectGroupGraph, computeUnitGraph, computeUnitGraphUsingDirectParents, preLoadCache
public static GraphComputeService initialize(VitamRepositoryProvider vitamRepositoryProvider, MetaData metaData, VitamCache<String,org.bson.Document> cache, List<Integer> tenants)
vitamRepositoryProvider
- metaData
- tenants
- public static GraphComputeService initialize(VitamRepositoryProvider vitamRepositoryProvider, MetaData metaData)
vitamRepositoryProvider
- metaData
- public static GraphComputeService getInstance()
public GraphComputeResponse computeGraph(com.fasterxml.jackson.databind.JsonNode queryDSL) throws MetaDataException
GraphComputeService
computeGraph
in interface GraphComputeService
MetaDataException
public GraphComputeResponse computeGraph(MetadataCollections metadataCollections, Set<String> documentsId, boolean computeObjectGroupGraph)
GraphComputeService
computeGraph
in interface GraphComputeService
metadataCollections
- the collection concerned by the build of the graphdocumentsId
- the collection of units subject of computing graphcomputeObjectGroupGraph
- true mean compute graphpublic void bulkUpdateMongo(MetadataCollections metaDaCollection, List<com.mongodb.client.model.WriteModel<org.bson.Document>> collection) throws DatabaseException
GraphComputeService
bulkUpdateMongo
in interface GraphComputeService
DatabaseException
public void bulkElasticsearch(MetadataCollections metaDaCollection, Set<String> collection) throws DatabaseException
GraphComputeService
bulkElasticsearch
in interface GraphComputeService
collection
- of id of documentsDatabaseException
public void bulkElasticsearch(MetadataCollections metaDaCollection, List<org.bson.Document> collection) throws DatabaseException
GraphComputeService
bulkElasticsearch
in interface GraphComputeService
collection
- of documentsDatabaseException
public void close()
close
in interface VitamAutoCloseable
close
in interface AutoCloseable
public boolean isInProgress()
isInProgress
in interface GraphComputeService
public com.google.common.cache.LoadingCache<String,org.bson.Document> getCache()
getCache
in interface VitamCache<String,org.bson.Document>
Copyright © 2018 Vitam. All rights reserved.