Class JaversSnapshotServiceImpl
java.lang.Object
org.qubership.atp.environments.service.direct.impl.JaversSnapshotServiceImpl
- All Implemented Interfaces:
JaversSnapshotService
@Service("javersSnapshotService")
public class JaversSnapshotServiceImpl
extends Object
implements JaversSnapshotService
-
Constructor Summary
ConstructorsConstructorDescriptionJaversSnapshotServiceImpl(JaversSnapshotRepositoryImpl repository, JaversCommitRepositoryImpl javersCommitRepository, JaversCommitPropertyRepositoryImpl javersCommitPropertyRepository, JaversGlobalIdRepositoryImpl javersGlobalIdRepository) Constructor for JaversSnapshotServiceImpl class. -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteOldAndUpdateAsInitial(Long version, Long globalId, Long commitId) Delete old snapshots, commit properties and commits.voidDelete terminated snapshots, globalIds, commits and commit properties.getGlobalIdAndCount(Integer lastRevisionCount) Get globalId and number of old objects.Get globalId, commitId and version for old objects.
-
Constructor Details
-
JaversSnapshotServiceImpl
@Autowired public JaversSnapshotServiceImpl(JaversSnapshotRepositoryImpl repository, JaversCommitRepositoryImpl javersCommitRepository, JaversCommitPropertyRepositoryImpl javersCommitPropertyRepository, JaversGlobalIdRepositoryImpl javersGlobalIdRepository) Constructor for JaversSnapshotServiceImpl class.- Parameters:
repository- javersSnapshot repository.javersCommitRepository- javersCommit repository.javersCommitPropertyRepository- javersCommitProperty repository.javersGlobalIdRepository- javersGlobalId repository.
-
-
Method Details
-
getGlobalIdAndCount
Get globalId and number of old objects.- Specified by:
getGlobalIdAndCountin interfaceJaversSnapshotService- Returns:
ListofJaversCountResponse
-
getOld
Get globalId, commitId and version for old objects.- Specified by:
getOldin interfaceJaversSnapshotService- Parameters:
globalId- global id.count- number of revisions which must be removed.- Returns:
ListofJaversVersionResponse
-
deleteOldAndUpdateAsInitial
Delete old snapshots, commit properties and commits. And update the oldest snapshot as initial.- Specified by:
deleteOldAndUpdateAsInitialin interfaceJaversSnapshotService- Parameters:
version- old version.globalId- global id.commitId- commit id.
-
deleteTerminatedSnapshots
@Transactional public void deleteTerminatedSnapshots()Delete terminated snapshots, globalIds, commits and commit properties.- Specified by:
deleteTerminatedSnapshotsin interfaceJaversSnapshotService
-