Package com.atlassian.bamboo.deletion
Class DeletionServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.deletion.DeletionServiceImpl
-
- All Implemented Interfaces:
DeletionService
public class DeletionServiceImpl extends Object implements DeletionService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.bamboo.deletion.DeletionService
DeletionService.FireEvent
-
-
Constructor Summary
Constructors Constructor Description DeletionServiceImpl(PlanScheduler planScheduler, com.atlassian.event.api.EventPublisher eventPublisher, ResultsSummaryManager resultsSummaryManager, ProjectManager projectManager, PlanManager planManager, ChainStageDao chainStageDao, com.atlassian.plugin.PluginAccessor pluginAccessor, ArtifactDefinitionManager artifactDefinitionManager, ArtifactSubscriptionManager artifactSubscriptionManager, AuditLogService auditLogService, StopBuildManager stopBuildManager, AgentAssignmentService agentAssignmentService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteJobsIgnoringBranches(Iterable<? extends Job> jobsToDelete)
Delete all the jobs on the list.void
deletePlan(@NotNull ImmutablePlan plan)
void
deletePlan(@NotNull Plan plan)
Set<PlanKey>
deletePlans(Iterable<String> planKeys)
void
deleteProject(@NotNull Project project)
Set<PlanKey>
deleteProjects(Iterable<String> projectKeys)
void
deleteStage(@NotNull ImmutableChainStage chainStage)
Schedules the supplied stage for deletion.void
deleteStage(@NotNull ChainStage chainStage)
void
deleteStagesIgnoringBranchesAndJobs(Iterable<ChainStage> stagesToDelete)
Delete all the stages on the list.void
executeDelayedDeletion()
Cleanup data scheduled for deletion duringDeletionService.deletePlan(Plan)
void
executeDelayedDeletionBlocking()
Clean up any orphaned build results lying around.void
removeOrphanedBuildResults()
Clean up any orphaned build results lying around.void
resumeDeletions()
Resumes delayed deletion.void
suspendDeletions()
Blocks until all currently deleted objects are deleted and then suspends deletions.boolean
suspendDeletions(long secondsToWait)
-
-
-
Constructor Detail
-
DeletionServiceImpl
public DeletionServiceImpl(PlanScheduler planScheduler, com.atlassian.event.api.EventPublisher eventPublisher, ResultsSummaryManager resultsSummaryManager, ProjectManager projectManager, PlanManager planManager, ChainStageDao chainStageDao, com.atlassian.plugin.PluginAccessor pluginAccessor, ArtifactDefinitionManager artifactDefinitionManager, ArtifactSubscriptionManager artifactSubscriptionManager, AuditLogService auditLogService, StopBuildManager stopBuildManager, AgentAssignmentService agentAssignmentService)
-
-
Method Detail
-
deleteProjects
public Set<PlanKey> deleteProjects(Iterable<String> projectKeys)
- Specified by:
deleteProjects
in interfaceDeletionService
-
deleteProject
public void deleteProject(@NotNull @NotNull Project project)
- Specified by:
deleteProject
in interfaceDeletionService
-
deletePlan
public void deletePlan(@NotNull @NotNull Plan plan)
- Specified by:
deletePlan
in interfaceDeletionService
-
deletePlan
public void deletePlan(@NotNull @NotNull ImmutablePlan plan)
- Specified by:
deletePlan
in interfaceDeletionService
-
deleteJobsIgnoringBranches
public void deleteJobsIgnoringBranches(Iterable<? extends Job> jobsToDelete)
Description copied from interface:DeletionService
Delete all the jobs on the list. This method DOES NOT cascade to branches and only removes objects that are explicitly listed.- Specified by:
deleteJobsIgnoringBranches
in interfaceDeletionService
-
deletePlans
public Set<PlanKey> deletePlans(Iterable<String> planKeys)
- Specified by:
deletePlans
in interfaceDeletionService
-
deleteStagesIgnoringBranchesAndJobs
public void deleteStagesIgnoringBranchesAndJobs(Iterable<ChainStage> stagesToDelete)
Description copied from interface:DeletionService
Delete all the stages on the list. This method DOES NOT cascade to branches and jobs and only removes objects that are explicitly listed.- Specified by:
deleteStagesIgnoringBranchesAndJobs
in interfaceDeletionService
-
deleteStage
public void deleteStage(@NotNull @NotNull ChainStage chainStage)
- Specified by:
deleteStage
in interfaceDeletionService
-
deleteStage
public void deleteStage(@NotNull @NotNull ImmutableChainStage chainStage)
Description copied from interface:DeletionService
Schedules the supplied stage for deletion.- Specified by:
deleteStage
in interfaceDeletionService
-
removeOrphanedBuildResults
public void removeOrphanedBuildResults()
Description copied from interface:DeletionService
Clean up any orphaned build results lying around.- Specified by:
removeOrphanedBuildResults
in interfaceDeletionService
-
executeDelayedDeletion
public void executeDelayedDeletion()
Description copied from interface:DeletionService
Cleanup data scheduled for deletion duringDeletionService.deletePlan(Plan)
- Specified by:
executeDelayedDeletion
in interfaceDeletionService
-
executeDelayedDeletionBlocking
public void executeDelayedDeletionBlocking()
Description copied from interface:DeletionService
Clean up any orphaned build results lying around. Blocking call if deletion lock is taken.- Specified by:
executeDelayedDeletionBlocking
in interfaceDeletionService
-
suspendDeletions
public void suspendDeletions()
Description copied from interface:DeletionService
Blocks until all currently deleted objects are deleted and then suspends deletions.- Specified by:
suspendDeletions
in interfaceDeletionService
-
suspendDeletions
public boolean suspendDeletions(long secondsToWait)
- Specified by:
suspendDeletions
in interfaceDeletionService
-
resumeDeletions
public void resumeDeletions()
Description copied from interface:DeletionService
Resumes delayed deletion.- Specified by:
resumeDeletions
in interfaceDeletionService
-
-