Class Maxwell

    • Method Detail

      • run

        public void run()
        run Maxwell, catching all Exceptions.
        Specified by:
        run in interface Runnable
      • restart

        public void restart()
                     throws Exception
        restarts a stopped Maxwell instance. rebuilds all connections, threads, etc.
        Throws:
        Exception - If Maxwell can't initialize its context
      • terminate

        public void terminate()
        Stop the currently running Maxwell
      • getInitialPosition

        protected Position getInitialPosition()
                                       throws Exception
        Determines initial replication position
        1. Retrieve stored position from `maxwell`.`positons`
        2. Attempt master recovery
        3. Use previous client_id's position. See https://github.com/zendesk/maxwell/issues/782
        4. Capture the current master position
        Returns:
        Binlog position to start replicating at
        Throws:
        Exception - Various SQL and IO exceptions
      • getMaxwellVersion

        public String getMaxwellVersion()
      • onReplicatorStart

        protected void onReplicatorStart()
        Hook for subclasses to execute code after all initialization is complete, but before replication starts.
      • onReplicatorEnd

        protected void onReplicatorEnd()
        Hook for subclasses to execute code before termination of the instance
      • start

        public void start()
                   throws Exception
        Start maxwell
        Throws:
        Exception - If maxwell stops due to an Exception
      • main

        public static void main​(String[] args)
        The main entry point for Maxwell
        Parameters:
        args - command line arguments