/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at
* trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
* add the following below this CDDL HEADER, with the fields enclosed
* by brackets "[]" replaced with your own identifying information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2006-2010 Sun Microsystems, Inc.
*/
/**
* 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.
*/
{
/**
* The tracer object for the debug logger.
*/
private int source;
// The total number of entries expected to be processed when this import
// will end successfully
// The number of entries still to be processed for this import to be
// completed
/**
* {@inheritDoc}
*/
}
/**
* {@inheritDoc}
*/
{
{
return;
}
// FIXME -- Do we need any special authorization here?
try
{
// We can assume that this is an LDAP replication domain
}
catch(DirectoryException e)
{
}
}
/**
* {@inheritDoc}
*/
{
if (debugEnabled())
{
}
initState = getTaskState();
try
{
// launch the import
synchronized(initState)
{
// Waiting for the end of the job
{
}
}
// Error raised at completion time
if (taskCompletionError != null)
}
catch(InterruptedException ie) {}
catch(DirectoryException de)
{
// Error raised at submission time
}
if (debugEnabled())
{
}
return initState;
}
/**
* Set the state for the current task.
*
* @param de When the new state is different from COMPLETED_SUCCESSFULLY
* this is the exception that contains the cause of the failure.
*/
{
try
{
else
}
finally
{
// Wake up runTask method waiting for completion
synchronized (initState)
{
}
}
}
/**
* Set the total number of entries expected to be imported.
* @param total The total number of entries.
*/
{
}
/**
* Set the total number of entries still to be imported.
* @param left The total number of entries to be imported.
*/
{
}
}