Class MySqlAccountServiceConfig


  • public class MySqlAccountServiceConfig
    extends AccountServiceConfig
    Configs for MySqlAccountService
    • Field Detail

      • MYSQL_ACCOUNT_SERVICE_PREFIX

        public static final java.lang.String MYSQL_ACCOUNT_SERVICE_PREFIX
        See Also:
        Constant Field Values
      • UPDATER_POLLING_INTERVAL_SECONDS

        public static final java.lang.String UPDATER_POLLING_INTERVAL_SECONDS
        See Also:
        Constant Field Values
      • UPDATER_SHUT_DOWN_TIMEOUT_MINUTES

        public static final java.lang.String UPDATER_SHUT_DOWN_TIMEOUT_MINUTES
        See Also:
        Constant Field Values
      • BACKUP_DIRECTORY_KEY

        public static final java.lang.String BACKUP_DIRECTORY_KEY
        See Also:
        Constant Field Values
      • DB_EXECUTE_BATCH_SIZE

        public static final java.lang.String DB_EXECUTE_BATCH_SIZE
        See Also:
        Constant Field Values
      • dbInfo

        @Config("mysql.account.service.db.info")
        @Default("")
        public final java.lang.String dbInfo
        Serialized json array containing the information about all mysql end points. This information should be of the following form:
           [
             {
               "url":"mysql-host1"
               "datacenter":"dc1",
               "isWriteable": "true",
               "username":"root",
                     "password":"password"
             },
             {
               "url":"mysql-host2"
               "datacenter":"dc2",
               "isWriteable": "false",
               "username":"root",
                     "password":"password"
             },
             {
               "url":"mysql-host3"
               "datacenter":"dc3",
               "isWriteable": "false",
               "username":"root",
                     "password":"password"
             }
           ]
         
      • updaterPollingIntervalSeconds

        @Config("mysql.account.service.updater.polling.interval.seconds")
        @Default("60")
        public final int updaterPollingIntervalSeconds
        The time interval in seconds between two consecutive account pulling for the background account updater of MySqlAccountService. Setting to 0 will disable it. Default value is 60 seconds.
      • updaterShutDownTimeoutMinutes

        @Config("mysql.account.service.updater.shut.down.timeout.minutes")
        @Default("2")
        public final int updaterShutDownTimeoutMinutes
        The timeout in minutes to shut down the account updater of MySqlAccountService. Default value is 2 minutes.
      • backupDir

        @Config("mysql.account.service.backup.dir")
        @Default("")
        public final java.lang.String backupDir
        The directory on the local machine where account data backups will be stored before updating accounts. If this string is empty, backups will be disabled.
      • maxBackupFileCount

        @Config("mysql.account.service.max.backup.file.count")
        @Default("10")
        public final int maxBackupFileCount
        The maximum number of local backup files kept in disk. When account service exceeds this count, every time it creates a new backup file, it will remove the oldest one.
      • updateDisabled

        @Config("mysql.account.service.update.disabled")
        @Default("false")
        public final boolean updateDisabled
        If true, MySqlAccountService would reject all the requests to update accounts.
      • dbExecuteBatchSize

        @Config("mysql.account.service.db.execute.batch.size")
        @Default("50")
        public final int dbExecuteBatchSize
        The number of mysql insert/update statements that can be batched together for execution.
    • Constructor Detail

      • MySqlAccountServiceConfig

        public MySqlAccountServiceConfig​(VerifiableProperties verifiableProperties)