public class ReplicationCliMain extends com.forgerock.opendj.cli.ConsoleApplication
Modifier and Type | Field and Description |
---|---|
static String |
LOG_FILE_PREFIX
Prefix for log files.
|
static String |
LOG_FILE_SUFFIX
Suffix for log files.
|
Constructor and Description |
---|
ReplicationCliMain(PrintStream out,
PrintStream err)
Constructor for the ReplicationCliMain object.
|
Modifier and Type | Method and Description |
---|---|
ReplicationCliReturnCode |
execute(String[] args,
boolean initializeServer)
Parses the provided command-line arguments and uses that information to
run the replication tool.
|
void |
initializeAllSuffix(String baseDN,
InitialLdapContext ctx,
boolean displayProgress)
Initializes all the replicas in the topology with the contents of a
given replica.
|
void |
initializeAllSuffixTry(String baseDN,
InitialLdapContext ctx,
boolean displayProgress)
Initializes all the replicas in the topology with the contents of a
given replica.
|
boolean |
isAdvancedMode() |
boolean |
isInteractive() |
boolean |
isMenuDrivenMode() |
boolean |
isQuiet() |
boolean |
isScriptFriendly() |
boolean |
isVerbose() |
static void |
main(String[] args)
The main method for the replication tool.
|
static int |
mainCLI(String[] args)
Parses the provided command-line arguments and uses that information to
run the replication tool.
|
static int |
mainCLI(String[] args,
boolean initializeServer,
OutputStream outStream,
OutputStream errStream)
Parses the provided command-line arguments and uses that information to
run the replication tool.
|
int |
readInteger(LocalizableMessage prompt,
int defaultValue)
Interactively retrieves an integer value from the console.
|
askConfirmation, askPort, confirmAction, errPrint, errPrintln, errPrintln, errPrintln, errPrintVerboseMessage, getErrorStream, getErrStream, getInputStream, getOutputStream, pressReturnToContinue, print, println, println, println, println, printProgressBar, printVerboseMessage, readInput, readInput, readLineOfInput, readPassword, readPassword, readPort, readValidatedInput, readValidatedInput
public static final String LOG_FILE_PREFIX
public static final String LOG_FILE_SUFFIX
public ReplicationCliMain(PrintStream out, PrintStream err)
out
- the print stream to use for standard output.err
- the print stream to use for standard error.public static void main(String[] args)
args
- the command-line arguments provided to this program.public static int mainCLI(String[] args)
args
- the command-line arguments provided to this program.public static int mainCLI(String[] args, boolean initializeServer, OutputStream outStream, OutputStream errStream)
args
- The command-line arguments provided to this
program.initializeServer
- Indicates whether to initialize the server.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 ReplicationCliReturnCode execute(String[] args, boolean initializeServer)
args
- the command-line arguments provided to this program.initializeServer
- Indicates whether to initialize the server.public final int readInteger(LocalizableMessage prompt, int defaultValue) throws com.forgerock.opendj.cli.ClientException
prompt
- The message prompt.defaultValue
- The default value.com.forgerock.opendj.cli.ClientException
- If the value could not be retrieved for some reason.public void initializeAllSuffix(String baseDN, InitialLdapContext ctx, boolean displayProgress) throws ReplicationCliException
ctx
- the connection to the server where the source replica of the
initialization is.baseDN
- the dn of the suffix.displayProgress
- whether we want to display progress or not.ReplicationCliException
- if an unexpected error occurs.public void initializeAllSuffixTry(String baseDN, InitialLdapContext ctx, boolean displayProgress) throws com.forgerock.opendj.cli.ClientException, PeerNotFoundException
ctx
- the connection to the server where the source replica of the
initialization is.baseDN
- the dn of the suffix.displayProgress
- whether we want to display progress or not.com.forgerock.opendj.cli.ClientException
- if an unexpected error occurs.PeerNotFoundException
- if the replication mechanism cannot find
a peer.public boolean isAdvancedMode()
isAdvancedMode
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isInteractive()
isInteractive
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isMenuDrivenMode()
isMenuDrivenMode
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isQuiet()
isQuiet
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isScriptFriendly()
isScriptFriendly
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isVerbose()
isVerbose
in class com.forgerock.opendj.cli.ConsoleApplication
Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.