Class ReplicationCliMain


  • public class ReplicationCliMain
    extends ConsoleApplication
    This class provides a tool that can be used to enable and disable replication and also to initialize the contents of a replicated suffix with the contents of another suffix. It also allows to display the replicated status of the different base DNs of the servers that are registered in the ADS.
    • Constructor Detail

      • ReplicationCliMain

        public ReplicationCliMain​(PrintStream out,
                                  PrintStream err)
        Constructor for the ReplicationCliMain object.
        Parameters:
        out - the print stream to use for standard output.
        err - the print stream to use for standard error.
    • Method Detail

      • main

        public static void main​(String[] args)
        The main method for the replication tool.
        Parameters:
        args - the command-line arguments provided to this program.
      • mainCLI

        public static int mainCLI​(String[] args)
        Parses the provided command-line arguments and uses that information to run the replication tool.
        Parameters:
        args - the command-line arguments provided to this program.
        Returns:
        The error code.
      • mainCLI

        public 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.
        Parameters:
        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.
        Returns:
        The error code.
      • initializeAllSuffix

        public void initializeAllSuffix​(DN baseDN,
                                        ConnectionWrapper conn,
                                        boolean displayProgress)
                                 throws ReplicationCliException
        Initializes all the replicas in the topology with the contents of a given replica.
        Parameters:
        conn - 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.
        Throws:
        ReplicationCliException - if an unexpected error occurs.
      • isAdvancedMode

        public boolean isAdvancedMode()
        Description copied from class: ConsoleApplication
        Indicates whether the user has requested advanced mode.
        Overrides:
        isAdvancedMode in class ConsoleApplication
        Returns:
        Returns true if the user has requested advanced mode.
      • isInteractive

        public boolean isInteractive()
        Description copied from class: ConsoleApplication
        Indicates whether the user has requested interactive behavior. The default implementation returns true.
        Overrides:
        isInteractive in class ConsoleApplication
        Returns:
        true if the user has requested interactive behavior.
      • isMenuDrivenMode

        public boolean isMenuDrivenMode()
        Description copied from class: ConsoleApplication
        Indicates whether this console application is running in its menu-driven mode. This can be used to dictate whether output should go to the error stream or not. In addition, it may also dictate whether sub-menus should display a cancel option as well as a quit option.
        Overrides:
        isMenuDrivenMode in class ConsoleApplication
        Returns:
        Returns true if this console application is running in its menu-driven mode.
      • isQuiet

        public boolean isQuiet()
        Description copied from class: ConsoleApplication
        Indicates whether the user has requested quiet output. The default implementation returns false.
        Overrides:
        isQuiet in class ConsoleApplication
        Returns:
        true if the user has requested quiet output.
      • isScriptFriendly

        public boolean isScriptFriendly()
        Description copied from class: ConsoleApplication
        Indicates whether the user has requested script-friendly output. The default implementation returns false.
        Overrides:
        isScriptFriendly in class ConsoleApplication
        Returns:
        true if the user has requested script-friendly output.
      • isVerbose

        public boolean isVerbose()
        Description copied from class: ConsoleApplication
        Indicates whether the user has requested verbose output. The default implementation returns false.
        Overrides:
        isVerbose in class ConsoleApplication
        Returns:
        true if the user has requested verbose output.