Class VitamCounterService
java.lang.Object
fr.gouv.vitam.functional.administration.common.counter.VitamCounterService
Vitam functional counter service
-
Constructor Summary
ConstructorDescriptionVitamCounterService
(MongoDbAccessAdminImpl dbConfiguration, List<Integer> tenants, Map<Integer, List<String>> externalIdentifiers) Constructor -
Method Summary
Modifier and TypeMethodDescriptiongetNextBackupSequenceDocument
(Integer tenant, SequenceType sequenceType) Atomically find a backup sequence and update it, returning updated document.getNextSequence
(Integer tenant, SequenceType sequenceType) Atomically find a sequence and update it.getNextSequenceAsString
(Integer tenant, SequenceType sequenceType) Atomically find a sequence and update it.getSequence
(Integer tenant, SequenceType sequenceType) Get the last sequence functional collectiongetSequenceDocument
(Integer tenant, SequenceType sequenceType) boolean
isSlaveFunctionnalCollectionOnTenant
(FunctionalAdminCollections collection, Integer tenant)
-
Constructor Details
-
VitamCounterService
public VitamCounterService(MongoDbAccessAdminImpl dbConfiguration, List<Integer> tenants, Map<Integer, List<String>> externalIdentifiers) throws VitamExceptionConstructor- Parameters:
dbConfiguration
-tenants
-externalIdentifiers
-- Throws:
VitamException
-
-
Method Details
-
getNextSequenceAsString
public String getNextSequenceAsString(Integer tenant, SequenceType sequenceType) throws ReferentialException Atomically find a sequence and update it.- Parameters:
tenant
-sequenceType
-- Returns:
- the sequence concatenated with it name the name
- Throws:
ReferentialException
-
getNextSequence
public Integer getNextSequence(Integer tenant, SequenceType sequenceType) throws ReferentialException Atomically find a sequence and update it.- Parameters:
tenant
-sequenceType
-- Returns:
- the sequence
- Throws:
InvalidCreateOperationException
InvalidParseOperationException
ReferentialException
-
getNextBackupSequenceDocument
public VitamSequence getNextBackupSequenceDocument(Integer tenant, SequenceType sequenceType) throws ReferentialException Atomically find a backup sequence and update it, returning updated document.- Parameters:
tenant
-sequenceType
-- Returns:
- the sequence
- Throws:
InvalidCreateOperationException
InvalidParseOperationException
ReferentialException
-
getSequence
Get the last sequence functional collection- Parameters:
tenant
-sequenceType
-- Returns:
- Throws:
ReferentialException
-
getSequenceDocument
public VitamSequence getSequenceDocument(Integer tenant, SequenceType sequenceType) throws ReferentialException - Throws:
ReferentialException
-
isSlaveFunctionnalCollectionOnTenant
public boolean isSlaveFunctionnalCollectionOnTenant(FunctionalAdminCollections collection, Integer tenant)
-