类 RandomDataSourceValidateThread

java.lang.Object
com.alibaba.druid.pool.ha.selector.RandomDataSourceValidateThread
所有已实现的接口:
Runnable

public class RandomDataSourceValidateThread extends Object implements Runnable
A Thread trying to test all DataSource provided by HADataSource. If a DataSource failed this test for 3 times (default value), it will be put into a blacklist.
作者:
DigitalSonic
  • 字段详细资料

    • DEFAULT_CHECKING_INTERVAL_SECONDS

      public static final int DEFAULT_CHECKING_INTERVAL_SECONDS
      另请参阅:
    • DEFAULT_BLACKLIST_THRESHOLD

      public static final int DEFAULT_BLACKLIST_THRESHOLD
      另请参阅:
  • 构造器详细资料

  • 方法详细资料

    • logSuccessTime

      public static void logSuccessTime(DataSourceProxy dataSource)
      Provide a static method to record the last success time of a DataSource
    • run

      public void run()
      指定者:
      run 在接口中 Runnable
    • getCheckingIntervalSeconds

      public int getCheckingIntervalSeconds()
    • setCheckingIntervalSeconds

      public void setCheckingIntervalSeconds(int checkingIntervalSeconds)
    • getValidationSleepSeconds

      public int getValidationSleepSeconds()
    • setValidationSleepSeconds

      public void setValidationSleepSeconds(int validationSleepSeconds)
    • getBlacklistThreshold

      public int getBlacklistThreshold()
    • setBlacklistThreshold

      public void setBlacklistThreshold(int blacklistThreshold)
    • getSelector

      public RandomDataSourceSelector getSelector()
    • setSelector

      public void setSelector(RandomDataSourceSelector selector)