Class PrimaryNodeServiceImpl

java.lang.Object
com.atlassian.bamboo.beehive.PrimaryNodeServiceImpl
All Implemented Interfaces:
PrimaryNodeService

public class PrimaryNodeServiceImpl extends Object implements PrimaryNodeService
  • Field Details

    • PRIMARY_NODE_LOCK_NAME

      public static final String PRIMARY_NODE_LOCK_NAME
      See Also:
    • 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:
    • NUMBER_OF_LEGIT_FAILED_ATTEMPTS_BEFORE_GIVING_UP

      public static final int NUMBER_OF_LEGIT_FAILED_ATTEMPTS_BEFORE_GIVING_UP
      See Also:
    • ACQUIRE_PRIMARY_NODE_LOCK_JOB_INTERVAL_SECONDS

      public static final int ACQUIRE_PRIMARY_NODE_LOCK_JOB_INTERVAL_SECONDS
  • Constructor Details

  • Method Details

    • 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
    • shutdown

      @PreDestroy public void shutdown()
      Description copied from interface: PrimaryNodeService
      Shutdown the service.
      Specified by:
      shutdown in interface PrimaryNodeService