Class JaversSnapshotScheduler
java.lang.Object
org.qubership.atp.ram.history.job.JaversSnapshotScheduler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteByCdoIdAndVersions(String cdoId, List<Long> versions) Delete old cdo objects by cdo id and version.voidDelete terminated objects.voidexecute(JaversCountResponse response) Delete old versions.findCdoIdAndCount(List<String> listOfCdoId) Get list of unique cdoId with number of objects with this cdoId.findObjectWithMinVersion(JaversCountResponse response, List<JaversVersionsResponse> oldObjects) Get cdo object with min version.findOldObjects(JaversCountResponse response) Get old cdo objects.Get terminated cdo ids.voidrun()Job that removes irrelevant data from the change history.voidupdateObjectAsInitial(String cdoId, Long version) Update the oldest cdo object as initial object.
-
Constructor Details
-
JaversSnapshotScheduler
public JaversSnapshotScheduler()
-
-
Method Details
-
run
@Scheduled(cron="${atp.archive.cron.expression}", zone="UTC") public void run()Job that removes irrelevant data from the change history. -
findCdoIdAndCount
Get list of unique cdoId with number of objects with this cdoId.- Returns:
ListofJaversCountResponse.
-
findOldObjects
Get old cdo objects.- Parameters:
response- object with cdo id and versions.- Returns:
ListofJaversVersionsResponse.
-
findObjectWithMinVersion
public Long findObjectWithMinVersion(JaversCountResponse response, List<JaversVersionsResponse> oldObjects) Get cdo object with min version.- Returns:
JaversVersionsResponse.
-
deleteByCdoIdAndVersions
Delete old cdo objects by cdo id and version. -
updateObjectAsInitial
Update the oldest cdo object as initial object.- Parameters:
cdoId- cdo id.version- the oldest version.
-
findTerminatedCdoId
Get terminated cdo ids. -
deleteTerminatedSnapshots
public void deleteTerminatedSnapshots()Delete terminated objects. -
execute
Delete old versions.
-