Class PrimaryNodeServiceImpl

    • Field Detail

      • PRIMARY_CLUSTER_LOCK_TIMEOUT_SECONDS

        public static final long PRIMARY_CLUSTER_LOCK_TIMEOUT_SECONDS
      • TIMEOUT_TO_INTERVAL_RATIO

        public static final int TIMEOUT_TO_INTERVAL_RATIO
        See Also:
        Constant Field Values
      • NUMBER_OF_LEGIT_FAILED_ATTEMPTS_BEFORE_GIVING_UP

        public static final int NUMBER_OF_LEGIT_FAILED_ATTEMPTS_BEFORE_GIVING_UP
        See Also:
        Constant Field Values
      • ACQUIRE_PRIMARY_NODE_LOCK_JOB_INTERVAL_SECONDS

        public static final int ACQUIRE_PRIMARY_NODE_LOCK_JOB_INTERVAL_SECONDS
    • Method Detail

      • joinPrimaryNodeElection

        public void joinPrimaryNodeElection()
                                     throws org.quartz.SchedulerException
        Description copied from interface: PrimaryNodeService
        Acquire primary node lock, or go into secondary node mode if the primary lock is held by another node. Care - this method starts the background job, therefore even the very first run is asynchronous and there is no guarantee that once this method returns the lock acquisition is complete.
        Specified by:
        joinPrimaryNodeElection in interface PrimaryNodeService
        Throws:
        org.quartz.SchedulerException