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 booleanaffects(SPersistentEntity entity)booleanaffectsProject(SProject project)voidcancel()Marks task as canceled, canceled task will not be executed on configs directory.voiddelete(SPersistentEntity entity)Marks config files of the specified entity for deletion.voiddelete(SProject project, String path)Marks a config file of the specified project for deletion.Collection<SPersistentEntity>getAffectedEntities()Set<String>getAffectedProjectExtIds()Set<SProject>getAffectedProjects()ConfigActiongetCause()List<Throwable>getErrors()Returns errors thrown during background task execution.StringgetOriginNodeId()Set<String>getSavedPaths()voidsetComplete()Marks task as complete meaning that all desired changes were provided to the task.voidsetContent(SPersistentEntity entity, byte[] content)Sets file content to be persisted.voidsetContent(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 IOExceptionSets 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 IOExceptionSets 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 UncheckedIOExceptionMarks 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, IOExceptionMarks a config file of the specified project for deletion.- Parameters:
project- whose file should be removedpath- path to the file- Throws:
UncheckedIOExceptionIOException
-
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()
-
-