Class SettingsPersisterImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.persisting.BasePersister
-
- jetbrains.buildServer.serverSide.impl.persisting.settings.SettingsPersisterImpl
-
- All Implemented Interfaces:
SettingsPersister
,TasksPersister
,SettingsPersister
public final class SettingsPersisterImpl extends BasePersister implements SettingsPersister
-
-
Field Summary
Fields Modifier and Type Field Description static String
GLOBAL_SETTINGS_TYPE
-
Fields inherited from class jetbrains.buildServer.serverSide.impl.persisting.BasePersister
myDeadlocksDetector, myLog, myOptions, mySaveExecutor, myServerResponsibility, myTasksStorage
-
-
Constructor Summary
Constructors Constructor Description SettingsPersisterImpl(PersisterOptions options, ServerResponsibilityEx serverResponsibility, PersistTasksStorage tasksStorage, EventDispatcher<BuildServerListener> events, SecurityContext securityContext, SettingsSerializer serializer, GlobalConfigsChangesCommitter globalConfigsChangesCommitter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onServerShutdown()
PersistTask
scheduleDeleteFile(String description, File file)
Schedules the task to remove the specified file.PersistTaskEx
scheduleSaveDocument(String description, File file, org.jdom.Document document)
Schedules the task to save the document into the file.PersistTaskEx
scheduleSaveDocument(String description, FileWatcher fileWatcher, org.jdom.Document document)
Schedules the task to save the document into the file monitored by the file watcher.PersistTaskEx
scheduleSaveFile(String description, File file, byte[] content)
Schedules the task to save the byte content into the file monitored by the file watcher.PersistTaskEx
scheduleSaveFile(String description, FileWatcher fileWatcher, byte[] content)
Schedules the task to save the byte content into the file monitored by the file watcher.-
Methods inherited from class jetbrains.buildServer.serverSide.impl.persisting.BasePersister
abortTask, addTask, canWriteToConfigDirectory, checkShutdown, checkWriteConfigsResponsibility, getFilesWatcher, getNextTaskId, isInsideTaskExecution, isShutdown, processTasks, runAllReadyToExecuteTasks, scheduleTask, setFilesWatcher, signalCompleteTask, visitTasks, waitForAllTaskRemoved, waitForTasksCompletion
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.SettingsPersister
abortTask
-
-
-
-
Field Detail
-
GLOBAL_SETTINGS_TYPE
public static final String GLOBAL_SETTINGS_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SettingsPersisterImpl
public SettingsPersisterImpl(@NotNull PersisterOptions options, @NotNull ServerResponsibilityEx serverResponsibility, @NotNull PersistTasksStorage tasksStorage, @NotNull EventDispatcher<BuildServerListener> events, @NotNull SecurityContext securityContext, @NotNull SettingsSerializer serializer, @NotNull GlobalConfigsChangesCommitter globalConfigsChangesCommitter)
-
-
Method Detail
-
scheduleSaveDocument
public PersistTaskEx scheduleSaveDocument(@NotNull String description, @NotNull FileWatcher fileWatcher, @NotNull org.jdom.Document document) throws IOException
Description copied from interface:SettingsPersister
Schedules the task to save the document into the file monitored by the file watcher.- Specified by:
scheduleSaveDocument
in interfaceSettingsPersister
- Specified by:
scheduleSaveDocument
in interfaceSettingsPersister
- Parameters:
description
- desciprition of the taskfileWatcher
- file watcher for the settings file, if settings file has configured file watcher. TeamCity will obtain real settings file from the file watcher viaFileWatcher.getFile()
method. TeamCity will imediatelly notify this file watcher about changes in file after persisting changes on disk.document
- XML document to be saved- Throws:
IOException
-
scheduleSaveDocument
public PersistTaskEx scheduleSaveDocument(@NotNull String description, @NotNull File file, @NotNull org.jdom.Document document) throws IOException
Description copied from interface:SettingsPersister
Schedules the task to save the document into the file.- Specified by:
scheduleSaveDocument
in interfaceSettingsPersister
- Specified by:
scheduleSaveDocument
in interfaceSettingsPersister
- Parameters:
description
- desciprition of the taskfile
- settings file to be changed, If the file has configured file watcher useSettingsPersister.scheduleSaveDocument(String, FileWatcher, Document)
insteaddocument
- XML document to be saved- Throws:
IOException
-
scheduleSaveFile
public PersistTaskEx scheduleSaveFile(@NotNull String description, @NotNull FileWatcher fileWatcher, @NotNull byte[] content) throws IOException
Description copied from interface:SettingsPersister
Schedules the task to save the byte content into the file monitored by the file watcher.- Specified by:
scheduleSaveFile
in interfaceSettingsPersister
- Specified by:
scheduleSaveFile
in interfaceSettingsPersister
- Parameters:
description
- desciprition of the taskfileWatcher
- file watcher for the settings file, if settings file has configured file watcher. TeamCity will obtain real settings file from the file watcher viaFileWatcher.getFile()
method. TeamCity will imediatelly notify this file watcher about changes in file after persisting changes on disk.content
- content of the file to be saved- Throws:
IOException
-
scheduleSaveFile
public PersistTaskEx scheduleSaveFile(@NotNull String description, @NotNull File file, @NotNull byte[] content) throws IOException
Description copied from interface:SettingsPersister
Schedules the task to save the byte content into the file monitored by the file watcher.- Specified by:
scheduleSaveFile
in interfaceSettingsPersister
- Specified by:
scheduleSaveFile
in interfaceSettingsPersister
- Parameters:
description
- desciprition of the taskfile
- settings file to be changed, If the file has configured file watcher useSettingsPersister.scheduleSaveFile(String, FileWatcher, byte[])
insteadcontent
- content of the file to be saved- Throws:
IOException
-
scheduleDeleteFile
public PersistTask scheduleDeleteFile(@NotNull String description, @NotNull File file) throws IOException
Description copied from interface:SettingsPersister
Schedules the task to remove the specified file.- Specified by:
scheduleDeleteFile
in interfaceSettingsPersister
- Throws:
IOException
-
onServerShutdown
public void onServerShutdown()
- Specified by:
onServerShutdown
in interfaceTasksPersister
- Overrides:
onServerShutdown
in classBasePersister
-
-