Package org.opends.server.tasks
Class BackupPurgeTask
- java.lang.Object
-
- org.opends.server.backends.task.Task
-
- org.opends.server.tasks.BackupPurgeTask
-
- All Implemented Interfaces:
Comparable<Task>
public final class BackupPurgeTask extends Task
This class provides an implementation of a Directory Server task that may be used to purge backups of a Directory Server.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opends.server.backends.task.Task
Task.WorkCounters
-
-
Constructor Summary
Constructors Constructor Description BackupPurgeTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalizableMessagegetAttributeDisplayName(String name)Given an attribute type name returns and locale sensitive representation.LocalizableMessagegetDisplayName()Gets a message that identifies this type of task suitable for presentation to humans in monitoring tools.protected voidinitializeTask(Entry taskEntry)Performs any task-specific initialization that may be required before processing can start.voidinterruptTask(TaskState interruptState, LocalizableMessage interruptReason)Performs any necessary processing to prematurely interrupt the execution of this task.booleanisInterruptible()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, compareTo, execute, getCompletionTime, getDependencyIDs, getFailedDependencyAction, getFinalTaskState, getLogMessages, getOperation, getRecurringTaskID, getScheduledStartTime, getServerContext, getTaskID, getTaskName, getTaskState, initializeTask, initializeTaskInternal, isRecurring, replaceAttributes, sendNotificationEMailMessage, setCompletionTime, setEntriesLeftAndDone, setOperation, setTaskInterruptState, toString
-
-
-
-
Method Detail
-
getDisplayName
public LocalizableMessage getDisplayName()
Description copied from class:TaskGets 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 LocalizableMessage getAttributeDisplayName(String name)
Description copied from class:TaskGiven an attribute type name returns and locale sensitive representation.- Overrides:
getAttributeDisplayNamein classTask- Parameters:
name- of an attribute type associated with the object class that represents this entry in the directory- Returns:
- LocalizableMessage display name
-
initializeTask
protected void initializeTask(Entry taskEntry) throws LdapException
Description copied from class:TaskPerforms 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- Parameters:
taskEntry- the task entry- Throws:
LdapException- If a problem occurs during initialization that should be returned to the client.
-
interruptTask
public void interruptTask(TaskState interruptState, LocalizableMessage interruptReason)
Description copied from class:TaskPerforms 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.
-
isInterruptible
public boolean isInterruptible()
Description copied from class:TaskIndicates whether this task is interruptible or not.- Overrides:
isInterruptiblein classTask- Returns:
- boolean where true indicates that this task can be interrupted.
-
-