Package org.opends.server.tasks
Class InitializeTask
- java.lang.Object
-
- org.opends.server.backends.task.Task
-
- org.opends.server.tasks.InitializeTask
-
- All Implemented Interfaces:
Comparable<Task>
public class InitializeTask extends Task
This class provides an implementation of a Directory Server task that can be used to import data over the replication protocol from another server hosting the same replication domain.
-
-
Constructor Summary
Constructors Constructor Description InitializeTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.protected TaskStaterunTask()Performs the actual core processing for this task.voidsetLeft(long left)Set the total number of entries still to be imported.voidsetTotal(long total)Set the total number of entries expected to be imported.voidupdateTaskCompletionState(DirectoryException de)Set the state for the current task.-
Methods inherited from class org.opends.server.backends.task.Task
addLogMessage, addLogMessage, compareTo, execute, getActualStartTime, getAttributeDisplayName, getCompletionTime, getDependencyIDs, getFailedDependencyAction, getFinalTaskState, getLogMessages, getNotifyOnCompletionAddresses, getNotifyOnErrorAddresses, getOperation, getRecurringTaskID, getScheduledStartTime, getServerContext, getTaskEntry, getTaskEntryDN, getTaskID, getTaskInterruptState, getTaskState, initializeTaskInternal, interruptTask, isCancelled, isInterruptable, 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
-
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.
-
runTask
protected TaskState runTask()
Description copied from class:TaskPerforms the actual core processing for this task. This method should not return until all processing associated with this task has completed.
-
updateTaskCompletionState
public void updateTaskCompletionState(DirectoryException de)
Set the state for the current task.- Parameters:
de- When the new state is different from COMPLETED_SUCCESSFULLY this is the exception that contains the cause of the failure.
-
setTotal
public void setTotal(long total)
Set the total number of entries expected to be imported.- Parameters:
total- The total number of entries.
-
setLeft
public void setLeft(long left)
Set the total number of entries still to be imported.- Parameters:
left- The total number of entries to be imported.
-
-