Class RemoteAgentWorkspaceManagerImpl
java.lang.Object
com.atlassian.bamboo.v2.build.agent.remote.workspaces.RemoteAgentWorkspaceManagerImpl
- All Implemented Interfaces:
AgentWorkspacesManager
-
Constructor Summary
ConstructorDescriptionRemoteAgentWorkspaceManagerImpl
(@NotNull BuildDirectoryManager buildDirectoryManager, @NotNull TaskContainerExistenceService taskContainerExistenceService, @NotNull com.atlassian.event.api.EventPublisher eventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onEnvironmentsDeleted
(@NotNull MultipleEnvironmentsDeletedEvent event) void
onJobDeleted
(@NotNull BuildDeletedEvent event) void
onJobsDeleted
(@NotNull MultipleJobsDeletedEvent event) void
registerWorkspace
(@NotNull Key key) Register workspace as being in use.void
Search for workspaces related to deleted jobs & environments.void
unregisterWorkspace
(@NotNull Key key) Mark workspace as unused and to be deleted in the nextAgentWorkspacesManager.scanAndRemoveUnusedWorkspaces()
.
-
Constructor Details
-
RemoteAgentWorkspaceManagerImpl
@Inject public RemoteAgentWorkspaceManagerImpl(@NotNull @NotNull BuildDirectoryManager buildDirectoryManager, @NotNull @NotNull TaskContainerExistenceService taskContainerExistenceService, @NotNull @NotNull com.atlassian.event.api.EventPublisher eventPublisher)
-
-
Method Details
-
scanAndRemoveUnusedWorkspaces
public void scanAndRemoveUnusedWorkspaces()Description copied from interface:AgentWorkspacesManager
Search for workspaces related to deleted jobs & environments. If workspace has not been used for the last 24h (see:AgentWorkspacesManager.registerWorkspace(Key)
, contact the server and check if the corresponding object still exists. After that, remove workspaces that are no longer used.- Specified by:
scanAndRemoveUnusedWorkspaces
in interfaceAgentWorkspacesManager
-
registerWorkspace
Description copied from interface:AgentWorkspacesManager
Register workspace as being in use. It will be skipped duringAgentWorkspacesManager.scanAndRemoveUnusedWorkspaces()
for the next 24h.- Specified by:
registerWorkspace
in interfaceAgentWorkspacesManager
-
unregisterWorkspace
Description copied from interface:AgentWorkspacesManager
Mark workspace as unused and to be deleted in the nextAgentWorkspacesManager.scanAndRemoveUnusedWorkspaces()
.- Specified by:
unregisterWorkspace
in interfaceAgentWorkspacesManager
-
onJobsDeleted
-
onJobDeleted
-
onEnvironmentsDeleted
@EventListener public void onEnvironmentsDeleted(@NotNull @NotNull MultipleEnvironmentsDeletedEvent event)
-