Package org.opends.server.tasks
Class InitializeTargetTask
java.lang.Object
org.opends.server.backends.task.Task
org.opends.server.tasks.InitializeTargetTask
- All Implemented Interfaces:
Comparable<Task>
This class provides an implementation of a Directory Server task that can be used to initialize another server by
exporting data over the replication protocol.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opends.server.backends.task.Task
Task.WorkCounters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
completed
(long entriesDoneDelta) Adds the number of entries that have recently been processed.Gets a message that identifies this type of task suitable for presentation to humans in monitoring tools.Returns the work counters.void
initializeTask
(Entry taskEntry) Performs any task-specific initialization that may be required before processing can start.protected TaskState
runTask()
Performs the actual core processing for this task.void
setTotalCount
(long totalEntryCount) Set the total number of entries expected to be exported.Methods inherited from class org.opends.server.backends.task.Task
addLogMessage, compareTo, execute, getAttributeDisplayName, getCompletionTime, getDependencyIDs, getFailedDependencyAction, getFinalTaskState, getLogMessages, getOperation, getRecurringTaskID, getScheduledStartTime, getServerContext, getTaskID, getTaskName, getTaskState, initializeTask, initializeTaskInternal, interruptTask, isInterruptible, isRecurring, replaceAttributes, sendNotificationEMailMessage, setCompletionTime, setEntriesLeftAndDone, setOperation, setTaskInterruptState, toString
-
Constructor Details
-
InitializeTargetTask
public InitializeTargetTask()
-
-
Method Details
-
getDisplayName
Description copied from class:Task
Gets a message that identifies this type of task suitable for presentation to humans in monitoring tools.- Overrides:
getDisplayName
in classTask
- Returns:
- name of task
-
initializeTask
Description copied from class:Task
Performs 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:
initializeTask
in classTask
- Parameters:
taskEntry
- the task entry- Throws:
LdapException
- If a problem occurs during initialization that should be returned to the client.
-
runTask
Description copied from class:Task
Performs the actual core processing for this task. This method should not return until all processing associated with this task has completed. -
getWorkCounters
Returns the work counters.- Returns:
- the work counters
-
setTotalCount
public void setTotalCount(long totalEntryCount) Set the total number of entries expected to be exported.- Parameters:
totalEntryCount
- the total number of entries to be exported.
-
completed
public void completed(long entriesDoneDelta) Adds the number of entries that have recently been processed.- Parameters:
entriesDoneDelta
- the number of entries that have recently been processed.
-