public class RebuildIndex extends TaskTool
Modifier and Type | Field and Description |
---|---|
static String |
OPTION_LONG_REBUILD_ALL
The value for the rebuild all long option.
|
canInitializeServer, NOW, OPTION_LONG_COMPRESS, OPTION_LONG_TMP_DIRECTORY, OPTION_SHORT_BACKEND_ID, OPTION_SHORT_COMPRESS
Constructor and Description |
---|
RebuildIndex(OutputStream out,
OutputStream err,
boolean canInitializeServer)
Creates a new
RebuildIndex with the provided output and error OutputStream s. |
Modifier and Type | Method and Description |
---|---|
void |
addTaskAttributes(Entry taskEntry)
Adds utility specific attributes to the provided task entry that is added to the task backend.
|
protected void |
cleanup()
Cleanup task environment after offline run.
|
Class<?> |
getTaskClass()
Gets the Class that implements the utility to execute.
|
String |
getTaskId()
Gets an arbitrary task id assigned to this task.
|
String |
getTaskObjectclass()
Gets the objectclass used to represent scheduled instances of this utility in the task backend.
|
static void |
main(String[] args)
Processes the command-line arguments and invokes the rebuild process.
|
static int |
mainRebuildIndex(String[] args,
boolean canInitializeServer,
OutputStream outStream,
OutputStream errStream)
Processes the command-line arguments and invokes the rebuild process.
|
protected com.forgerock.opendj.cli.ReturnCode |
processLocal()
Called when this utility should perform its actions locally in this JVM.
|
static void |
rebuildIndexEmbeddedOffline(com.forgerock.opendj.cli.ArgumentsBuilder arguments,
OutputStream outStream,
OutputStream errStream)
This method is used for running the rebuild-index tool programmatically against an offline server.
|
com.forgerock.opendj.cli.ReturnCode |
rebuildIndexesWithinMultipleBackends(Collection<String> args)
This function allow internal use of the rebuild index tools.
|
protected com.forgerock.opendj.cli.ReturnCode |
runTaskTool(String[] args)
Runs the concrete tool implementation with the provided arguments.
|
addAttribute, addAttributeIfArgumentPresent, getArgumentParser, getDependencyIds, getFailedDependencyAction, getNotifyUponCompletionEmailAddresses, getNotifyUponErrorEmailAddresses, getRecurringDateTime, getStartDateTime, isEmbedded, process, run, runEmbeddedOffline, runOffline, shutdownBackends, validateArguments, validateTaskArgs
askConfirmation, askPort, close, confirmAction, enableConsoleLoggingIfVerbose, errPrintln, errPrintln, errPrintln, errPrintlnSurroundedByBlankLines, errPrintVerboseMessage, flush, flushLogStream, getErrorStream, getErrStream, getInputStream, getOutputStream, isFullyInteractive, isQuiet, isScriptFriendly, isVerbose, logVerboseMessage, mayPrompt, parseArguments, pressReturnToContinue, print, println, println, println, println, printlnNoWrap, printlnSurroundedByBlankLines, printNoWrap, readInput, readInput, readInputAllowEmpty, readLineOfInput, readPassword, readPassword, readValidatedInput, readValidatedInput, report
public static final String OPTION_LONG_REBUILD_ALL
public RebuildIndex(OutputStream out, OutputStream err, boolean canInitializeServer)
RebuildIndex
with the provided output and error OutputStream
s.out
- The tool output streamerr
- The tool error streamcanInitializeServer
- true
if the server can be initialized, false
otherwise (basically, because this is
executed in the context of a unit-test).public static void main(String[] args)
args
- The command-line arguments provided to this program.public static int mainRebuildIndex(String[] args, boolean canInitializeServer, OutputStream outStream, OutputStream errStream)
args
- The command-line arguments provided to this program.canInitializeServer
- true
if the server can be initialized, false
otherwise (basically, because this is
executed in the context of a unit-test).outStream
- The output stream to use for standard output, or null
if standard output is not needed.errStream
- The output stream to use for standard error, or null
if standard error is not needed.public static void rebuildIndexEmbeddedOffline(com.forgerock.opendj.cli.ArgumentsBuilder arguments, OutputStream outStream, OutputStream errStream) throws com.forgerock.opendj.cli.ClientException
The --offline and --noPropertyFile arguments are automatically added to
the tool arguments.
Rebuilding indexes offline implies that the DirectoryServer
will be initialized.
arguments
- The command-line arguments provided to this programoutStream
- The output stream to use for standard output, or null
if standard output is not needederrStream
- The output stream to use for standard error, or null
if standard error is not neededcom.forgerock.opendj.cli.ClientException
- If an error occurs during the tool execution or if the tool has returned an errorprotected com.forgerock.opendj.cli.ReturnCode runTaskTool(String[] args) throws com.forgerock.opendj.cli.ClientException
TaskTool
runTaskTool
in class TaskTool
args
- The command line arguments.ReturnCode
returned by the tool execution.com.forgerock.opendj.cli.ClientException
- If an error occurs during tool execution.protected com.forgerock.opendj.cli.ReturnCode processLocal() throws com.forgerock.opendj.cli.ClientException
TaskTool
processLocal
in class TaskTool
com.forgerock.opendj.cli.ClientException
- If an error occurs while running the toolprotected void cleanup()
TaskTool
public com.forgerock.opendj.cli.ReturnCode rebuildIndexesWithinMultipleBackends(Collection<String> args)
args
- The arguments used to launch the rebuild index process.public String getTaskId()
TaskScheduleInformation
null
otherwise.public void addTaskAttributes(Entry taskEntry)
TaskScheduleInformation
taskEntry
- The task Entry
to update.public String getTaskObjectclass()
TaskScheduleInformation
public Class<?> getTaskClass()
TaskScheduleInformation
Copyright 2010-2022 ForgeRock AS.