public class VitamCounterService extends Object
Constructor and Description |
---|
VitamCounterService(MongoDbAccessAdminImpl dbConfiguration,
List<Integer> tenants,
Map<Integer,List<String>> externalIdentifiers)
Constructor
|
Modifier and Type | Method and Description |
---|---|
VitamSequence |
getNextBackupSequenceDocument(Integer tenant,
SequenceType sequenceType)
Atomically find a backup sequence and update it, returning updated document.
|
Integer |
getNextSequence(Integer tenant,
SequenceType sequenceType)
Atomically find a sequence and update it.
|
String |
getNextSequenceAsString(Integer tenant,
SequenceType sequenceType)
Atomically find a sequence and update it.
|
Integer |
getSequence(Integer tenant,
SequenceType sequenceType)
Get the last sequence functional collection
|
VitamSequence |
getSequenceDocument(Integer tenant,
SequenceType sequenceType) |
boolean |
isSlaveFunctionnalCollectionOnTenant(FunctionalAdminCollections collection,
Integer tenant) |
public VitamCounterService(MongoDbAccessAdminImpl dbConfiguration, List<Integer> tenants, Map<Integer,List<String>> externalIdentifiers) throws VitamException
dbConfiguration
- tenants
- externalIdentifiers
- VitamException
public String getNextSequenceAsString(Integer tenant, SequenceType sequenceType) throws ReferentialException
tenant
- sequenceType
- ReferentialException
public Integer getNextSequence(Integer tenant, SequenceType sequenceType) throws ReferentialException
tenant
- sequenceType
- InvalidCreateOperationException
InvalidParseOperationException
ReferentialException
public VitamSequence getNextBackupSequenceDocument(Integer tenant, SequenceType sequenceType) throws ReferentialException
tenant
- sequenceType
- InvalidCreateOperationException
InvalidParseOperationException
ReferentialException
public Integer getSequence(Integer tenant, SequenceType sequenceType) throws ReferentialException
tenant
- sequenceType
- ReferentialException
public VitamSequence getSequenceDocument(Integer tenant, SequenceType sequenceType) throws ReferentialException
ReferentialException
public boolean isSlaveFunctionnalCollectionOnTenant(FunctionalAdminCollections collection, Integer tenant)
Copyright © 2018 Vitam. All rights reserved.