Package org.opends.server.tasks
Class BackupTask
- java.lang.Object
-
- org.opends.server.backends.task.Task
-
- org.opends.server.tasks.BackupTask
-
- All Implemented Interfaces:
Comparable<Task>
public class BackupTask extends Task
This class provides an implementation of a Directory Server task that may be used to back up a Directory Server backend in a binary form that may be quickly archived and restored.
-
-
Constructor Summary
Constructors Constructor Description BackupTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.forgerock.i18n.LocalizableMessagegetAttributeDisplayName(String attrName)Given an attribute type name returns and locale sensitive representation.org.forgerock.i18n.LocalizableMessagegetDisplayName()Gets a message that identifies this type of task suitable for presentation to humans in monitoring tools.voidinitializeTask()Performs any task-specific initialization that may be required before processing can start.voidinterruptTask(TaskState interruptState, org.forgerock.i18n.LocalizableMessage interruptReason)Performs any necessary processing to prematurely interrupt the execution of this task.booleanisInterruptable()Indicates whether this task is interruptible or not.protected TaskStaterunTask()Performs the actual core processing for this task.-
Methods inherited from class org.opends.server.backends.task.Task
addLogMessage, addLogMessage, compareTo, execute, getActualStartTime, getCompletionTime, getDependencyIDs, getFailedDependencyAction, getFinalTaskState, getLogMessages, getNotifyOnCompletionAddresses, getNotifyOnErrorAddresses, getOperation, getRecurringTaskID, getScheduledStartTime, getServerContext, getTaskEntry, getTaskEntryDN, getTaskID, getTaskInterruptState, getTaskState, initializeTaskInternal, isCancelled, isRecurring, replaceAttributeValue, sendNotificationEMailMessage, setCompletionTime, setOperation, setTaskInterruptState
-
-
-
-
Method Detail
-
getDisplayName
public org.forgerock.i18n.LocalizableMessage getDisplayName()
Gets a message that identifies this type of task suitable for presentation to humans in monitoring tools.- Overrides:
getDisplayNamein classTask- Returns:
- name of task
-
getAttributeDisplayName
public org.forgerock.i18n.LocalizableMessage getAttributeDisplayName(String attrName)
Given an attribute type name returns and locale sensitive representation.- Overrides:
getAttributeDisplayNamein classTask- Parameters:
attrName- of an attribute type associated with the object class that represents this entry in the directory- Returns:
- LocalizableMessage display name
-
initializeTask
public void initializeTask() throws DirectoryExceptionPerforms any task-specific initialization that may be required before processing can start. This default implementation does not do anything, but subclasses may override it as necessary. This method will be called at the time the task is scheduled, and therefore any failure in this method will be returned to the client.- Overrides:
initializeTaskin classTask- Throws:
DirectoryException- If a problem occurs during initialization that should be returned to the client.
-
interruptTask
public void interruptTask(TaskState interruptState, org.forgerock.i18n.LocalizableMessage interruptReason)
Performs any necessary processing to prematurely interrupt the execution of this task. By default no action is performed, but if it is feasible to gracefully interrupt a task, then subclasses should override this method to do so. Implementations of this method are expected to callTask.setTaskInterruptState(TaskState)if the interruption is accepted by this task.- Overrides:
interruptTaskin classTask- Parameters:
interruptState- The state to use for the task if it is successfully interrupted.interruptReason- A human-readable explanation for the cancellation.
-
isInterruptable
public boolean isInterruptable()
Indicates whether this task is interruptible or not.- Overrides:
isInterruptablein classTask- Returns:
- boolean where true indicates that this task can be interrupted.
-
-