Interface BackgroundPersistTask
-
- All Superinterfaces:
PersistTask
- All Known Implementing Classes:
ProjectPersistTask
public interface BackgroundPersistTask extends PersistTask
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
affects(SPersistentEntity entity)
boolean
affectsProject(SProject project)
void
cancel()
Marks task as canceled, canceled task will not be executed on configs directory.void
delete(SPersistentEntity entity)
Marks config files of the specified entity for deletion.void
delete(SProject project, String path)
Marks a config file of the specified project for deletion.Collection<SPersistentEntity>
getAffectedEntities()
Set<String>
getAffectedProjectExtIds()
Set<SProject>
getAffectedProjects()
ConfigAction
getCause()
List<Throwable>
getErrors()
Returns errors thrown during background task execution.String
getOriginNodeId()
Set<String>
getSavedPaths()
void
setComplete()
Marks task as complete meaning that all desired changes were provided to the task.void
setContent(SPersistentEntity entity, byte[] content)
Sets file content to be persisted.void
setContent(SProject project, String path, byte[] content)
Sets file content to be persisted.-
Methods inherited from interface jetbrains.buildServer.serverSide.PersistTask
await, await, awaitUninterruptibly, getDescription, getError, getId, getStage
-
-
-
-
Method Detail
-
setContent
void setContent(@NotNull SPersistentEntity entity, @NotNull byte[] content) throws IOException
Sets file content to be persisted.- Parameters:
entity
- entity which content is persistedcontent
- content to persist- Throws:
IOException
- when task failed to save the content in task dir
-
setContent
void setContent(@NotNull SProject project, @NotNull String path, @NotNull byte[] content) throws IOException
Sets file content to be persisted. Should be used for paths which don't depend on external ids.- Parameters:
project
- project within which content should be persistedpath
- path relative to project root directorycontent
- content to persist- Throws:
IOException
- when task failed to save the content in task dir
-
delete
void delete(@NotNull SPersistentEntity entity) throws UncheckedIOException
Marks config files of the specified entity for deletion.- Parameters:
entity
- entity of interest- Throws:
UncheckedIOException
-
delete
void delete(@NotNull SProject project, @NotNull String path) throws UncheckedIOException, IOException
Marks a config file of the specified project for deletion.- Parameters:
project
- whose file should be removedpath
- path to the file- Throws:
UncheckedIOException
IOException
-
setComplete
void setComplete()
Marks task as complete meaning that all desired changes were provided to the task. Changes made after setComplete() call will lead to exception.
-
cancel
void cancel()
Marks task as canceled, canceled task will not be executed on configs directory.
-
getErrors
@NotNull List<Throwable> getErrors()
Returns errors thrown during background task execution.- Returns:
- errors thrown during background task execution
-
getCause
@NotNull ConfigAction getCause()
-
getAffectedEntities
@NotNull Collection<SPersistentEntity> getAffectedEntities()
-
affects
boolean affects(@NotNull SPersistentEntity entity)
-
affectsProject
boolean affectsProject(@NotNull SProject project)
-
getOriginNodeId
@NotNull String getOriginNodeId()
-
-