Class HTTPServerConfig

java.lang.Object
org.languagetool.server.HTTPServerConfig
Direct Known Subclasses:
HTTPSServerConfig

public class HTTPServerConfig extends Object
Since:
2.0
  • Field Details

    • logger

      private static final org.slf4j.Logger logger
    • DEFAULT_HOST

      public static final String DEFAULT_HOST
      See Also:
    • DEFAULT_PORT

      public static final int DEFAULT_PORT
      The default port on which the server is running (8081).
      See Also:
    • LANGUAGE_MODEL_OPTION

      static final String LANGUAGE_MODEL_OPTION
      See Also:
    • verbose

      protected boolean verbose
    • publicAccess

      protected boolean publicAccess
    • port

      protected int port
    • minPort

      protected int minPort
    • maxPort

      protected int maxPort
    • allowOriginUrl

      protected String allowOriginUrl
    • logIp

      protected boolean logIp
    • logIpMatchingPattern

      protected String logIpMatchingPattern
    • serverURL

      protected URI serverURL
    • maxTextLengthAnonymous

      protected int maxTextLengthAnonymous
    • maxTextLengthLoggedIn

      protected int maxTextLengthLoggedIn
    • maxTextLengthPremium

      protected int maxTextLengthPremium
    • maxTextHardLength

      protected int maxTextHardLength
    • maxCheckTimeMillisAnonymous

      protected long maxCheckTimeMillisAnonymous
    • maxCheckTimeMillisLoggedIn

      protected long maxCheckTimeMillisLoggedIn
    • maxCheckTimeMillisPremium

      protected long maxCheckTimeMillisPremium
    • maxCheckThreads

      protected int maxCheckThreads
    • maxTextCheckerThreads

      protected int maxTextCheckerThreads
    • textCheckerQueueSize

      protected int textCheckerQueueSize
    • mode

      protected HTTPServerConfig.Mode mode
    • languageModelDir

      protected File languageModelDir
    • ruleIdToConfidenceFile

      protected File ruleIdToConfidenceFile
    • pipelineCaching

      protected boolean pipelineCaching
    • pipelinePrewarming

      protected boolean pipelinePrewarming
    • maxPipelinePoolSize

      protected int maxPipelinePoolSize
    • pipelineExpireTime

      protected int pipelineExpireTime
    • fasttextModel

      protected File fasttextModel
    • fasttextBinary

      protected File fasttextBinary
    • requestLimit

      protected int requestLimit
    • requestLimitInBytes

      protected int requestLimitInBytes
    • timeoutRequestLimit

      protected int timeoutRequestLimit
    • requestLimitPeriodInSeconds

      protected int requestLimitPeriodInSeconds
    • requestLimitWhitelistUsers

      protected List<String> requestLimitWhitelistUsers
    • requestLimitWhitelistLimit

      protected int requestLimitWhitelistLimit
    • ipFingerprintFactor

      protected int ipFingerprintFactor
    • trustXForwardForHeader

      protected boolean trustXForwardForHeader
    • maxWorkQueueSize

      protected int maxWorkQueueSize
    • rulesConfigFile

      protected File rulesConfigFile
    • remoteRulesConfigFile

      protected File remoteRulesConfigFile
    • cacheSize

      protected int cacheSize
    • cacheTTLSeconds

      protected long cacheTTLSeconds
    • maxErrorsPerWordRate

      protected float maxErrorsPerWordRate
    • maxSpellingSuggestions

      protected int maxSpellingSuggestions
    • blockedReferrers

      protected List<String> blockedReferrers
    • trustedSources

      protected Pattern trustedSources
    • premiumAlways

      protected boolean premiumAlways
    • premiumOnly

      protected boolean premiumOnly
    • requestLimitAccessToken

      protected String requestLimitAccessToken
    • defaultThirdPartyAI

      protected boolean defaultThirdPartyAI
    • anonymousAccessAllowed

      boolean anonymousAccessAllowed
    • gracefulDatabaseFailure

      protected boolean gracefulDatabaseFailure
    • restrictManagedAccounts

      protected boolean restrictManagedAccounts
    • dbDriver

      protected String dbDriver
    • dbUrl

      protected String dbUrl
    • dbUsername

      protected String dbUsername
    • dbPassword

      protected String dbPassword
    • dbTimeoutSeconds

      protected long dbTimeoutSeconds
    • dbMaxConnections

      protected int dbMaxConnections
    • databaseTimeoutRateThreshold

      protected int databaseTimeoutRateThreshold
    • databaseErrorRateThreshold

      protected int databaseErrorRateThreshold
    • databaseDownIntervalSeconds

      protected int databaseDownIntervalSeconds
    • dbLogging

      protected boolean dbLogging
    • prometheusMonitoring

      protected boolean prometheusMonitoring
    • prometheusPort

      protected int prometheusPort
    • globalConfig

      protected GlobalConfig globalConfig
    • disabledRuleIds

      protected List<String> disabledRuleIds
    • stoppable

      protected boolean stoppable
    • passwortLoginAccessListPath

      protected String passwortLoginAccessListPath
    • redisHost

      @Nullable protected String redisHost
      caching to avoid database hits for e.g. dictionaries null -> disabled
    • redisPort

      protected int redisPort
    • redisDatabase

      protected int redisDatabase
    • redisUseSSL

      protected boolean redisUseSSL
    • redisCertificate

      protected String redisCertificate
    • redisKey

      protected String redisKey
    • redisKeyPassword

      protected String redisKeyPassword
    • redisPassword

      @Nullable protected String redisPassword
    • redisDictTTL

      protected long redisDictTTL
    • redisTimeout

      protected long redisTimeout
    • redisConnectionTimeout

      protected long redisConnectionTimeout
    • redisUseSentinel

      protected boolean redisUseSentinel
    • sentinelHost

      protected String sentinelHost
    • sentinelPort

      protected int sentinelPort
    • sentinelPassword

      protected String sentinelPassword
    • sentinelMasterId

      protected String sentinelMasterId
    • skipLoggingRuleMatches

      protected boolean skipLoggingRuleMatches
    • skipLoggingChecks

      protected boolean skipLoggingChecks
    • slowRuleLoggingThreshold

      protected int slowRuleLoggingThreshold
    • abTest

      protected List<String> abTest
    • abTestClients

      protected Pattern abTestClients
    • abTestRollout

      protected int abTestRollout
    • ngramLangIdentData

      protected File ngramLangIdentData
    • localApiMode

      protected boolean localApiMode
    • motherTongue

      protected String motherTongue
    • preferredLanguages

      protected List<String> preferredLanguages
    • dictLimitUser

      protected int dictLimitUser
    • dictLimitTeam

      protected int dictLimitTeam
    • styleGuideLimitUser

      protected int styleGuideLimitUser
    • styleGuideLimitTeam

      protected int styleGuideLimitTeam
    • KNOWN_OPTION_KEYS

      private static final List<String> KNOWN_OPTION_KEYS
  • Constructor Details

    • HTTPServerConfig

      public HTTPServerConfig()
      Create a server configuration for the default port (DEFAULT_PORT).
    • HTTPServerConfig

      public HTTPServerConfig(int serverPort)
      Parameters:
      serverPort - the port to bind to
      Since:
      2.8
    • HTTPServerConfig

      public HTTPServerConfig(int serverPort, boolean verbose)
      Parameters:
      serverPort - the port to bind to
      verbose - when set to true, the input text will be logged in case there is an exception
    • HTTPServerConfig

      HTTPServerConfig(String[] args)
      Parse command line options.
  • Method Details

    • setPremiumOnly

      public void setPremiumOnly(boolean premiumOnly)
    • isAnonymousAccessAllowed

      public boolean isAnonymousAccessAllowed()
    • isRestrictManagedAccounts

      public boolean isRestrictManagedAccounts()
      Returns:
      whether user creation should be restricted (e.g. according to subscriptions in cloud usage) or be unlimited (for self-hosted installations)
      Since:
      4.9
    • setRestrictManagedAccounts

      public void setRestrictManagedAccounts(boolean restrictManagedAccounts)
    • parseConfigFile

      private void parseConfigFile(File file, boolean loadLangModel)
    • addDynamicLanguages

      private void addDynamicLanguages(Properties props) throws IOException
      Throws:
      IOException
    • setLanguageModelDirectory

      public void setLanguageModelDirectory(String langModelDir)
    • setFasttextPaths

      void setFasttextPaths(String fasttextModelPath, String fasttextBinaryPath)
    • isVerbose

      public boolean isVerbose()
    • isPublicAccess

      public boolean isPublicAccess()
    • getPort

      public int getPort()
    • getMinPort

      public int getMinPort()
    • getMaxPort

      public int getMaxPort()
    • getAllowOriginUrl

      @Nullable public String getAllowOriginUrl()
      Value to set as the "Access-Control-Allow-Origin" http header. null will not return that header at all. With * your server can be used from any other web site from Javascript/Ajax (search Cross-origin resource sharing (CORS) for details).
    • setAllowOriginUrl

      public void setAllowOriginUrl(String allowOriginUrl)
      Since:
      4.2
    • getServerURL

      @Nullable public URI getServerURL()
      Returns:
      prefix / base URL for API requests
      Since:
      4.8
    • setServerURL

      public void setServerURL(@Nullable String url)
      Parameters:
      url - prefix / base URL for API requests
      Since:
      4.8
    • setMaxTextLengthAnonymous

      public void setMaxTextLengthAnonymous(int len)
      Parameters:
      len - the maximum text length allowed (in number of characters), texts that are longer will cause an exception when being checked, unless the user can provide an API key
    • setMaxTextLengthLoggedIn

      public void setMaxTextLengthLoggedIn(int len)
    • setMaxTextLengthPremium

      public void setMaxTextLengthPremium(int len)
    • setMaxTextHardLength

      public void setMaxTextHardLength(int len)
      Parameters:
      len - the maximum text length allowed (in number of characters), texts that are longer will cause an exception when being checked even if the user can provide an API key
      Since:
      3.9
    • getMaxTextLengthAnonymous

      int getMaxTextLengthAnonymous()
    • getMaxTextLengthLoggedIn

      int getMaxTextLengthLoggedIn()
      For users that have an account, but no premium subscription
    • getMaxTextLengthPremium

      int getMaxTextLengthPremium()
    • getMaxTextHardLength

      int getMaxTextHardLength()
      Limit for maximum text length - text cannot be longer than this, even if user has valid secret token.
      Since:
      3.9
    • getRequestLimitWhitelistUsers

      public List<String> getRequestLimitWhitelistUsers()
      Since:
      5.3 use a higher request limit for a list of users
    • setRequestLimitWhitelistUsers

      public void setRequestLimitWhitelistUsers(List<String> requestLimitWhitelistUsers)
    • getRequestLimitWhitelistLimit

      public int getRequestLimitWhitelistLimit()
      Since:
      5.3 use a higher request limit for a list of users
    • setRequestLimitWhitelistLimit

      public void setRequestLimitWhitelistLimit(int requestLimitWhitelistLimit)
    • getRequestLimit

      int getRequestLimit()
    • getTimeoutRequestLimit

      int getTimeoutRequestLimit()
      Since:
      4.0
    • getRequestLimitInBytes

      int getRequestLimitInBytes()
      Since:
      4.0
    • getRequestLimitPeriodInSeconds

      int getRequestLimitPeriodInSeconds()
    • setRequestLimit

      public void setRequestLimit(int requestLimit)
      Since:
      6.3
    • setRequestLimitPeriodInSeconds

      public void setRequestLimitPeriodInSeconds(int requestLimitPeriodInSeconds)
      Since:
      6.3
    • getRequestLimitAccessToken

      public String getRequestLimitAccessToken()
      Since:
      6.3 Can configure a secret value for the Header X-Request-Limit-Access-Token that allows skipping limtis
    • setRequestLimitAccessToken

      public void setRequestLimitAccessToken(String requestLimitAccessToken)
      Since:
      6.3
    • getIpFingerprintFactor

      int getIpFingerprintFactor()
      since 4.4
      Returns:
      if > 0: allow n more requests per IP if fingerprints differ if invalid input: '<'= 0: disable fingerprinting, only rely on IP address
    • setMaxCheckTimeMillisAnonymous

      void setMaxCheckTimeMillisAnonymous(int maxCheckTimeMillis)
      Parameters:
      maxCheckTimeMillis - The maximum duration allowed for a single check in milliseconds, checks that take longer will stop with an exception. Use -1 for no limit.
      Since:
      4.4
    • getMaxCheckTimeMillisAnonymous

      long getMaxCheckTimeMillisAnonymous()
      Since:
      4.4
    • setMaxCheckTimeMillisLoggedIn

      void setMaxCheckTimeMillisLoggedIn(int maxCheckTimeMillis)
      Since:
      4.4
    • getMaxCheckTimeMillisLoggedIn

      long getMaxCheckTimeMillisLoggedIn()
      Since:
      4.4
    • setMaxCheckTimeMillisPremium

      void setMaxCheckTimeMillisPremium(int maxCheckTimeMillis)
      Since:
      4.4
    • getMaxCheckTimeMillisPremium

      @Experimental long getMaxCheckTimeMillisPremium()
      Since:
      4.4
    • getLanguageModelDir

      @Nullable File getLanguageModelDir()
      Get language model directory (which contains '3grams' sub directory) or null.
      Since:
      2.7
    • getFasttextModel

      @Nullable public File getFasttextModel()
      Get model path for fasttext language detection
      Since:
      4.3
    • setFasttextModel

      public void setFasttextModel(File model)
      Set model path for fasttext language detection
      Since:
      4.4
    • getFasttextBinary

      @Nullable public File getFasttextBinary()
      Get binary path for fasttext language detection
      Since:
      4.3
    • setFasttextBinary

      public void setFasttextBinary(File binary)
      Set binary path for fasttext language detection
      Since:
      4.4
    • getMode

      Since:
      2.7
    • setMaxCheckThreads

      void setMaxCheckThreads(int maxCheckThreads)
      Parameters:
      maxCheckThreads - The maximum number of threads serving requests running at the same time. If there are more requests, they will be queued until a thread can work on them.
      Since:
      2.7
    • getMaxCheckThreads

      int getMaxCheckThreads()
      Since:
      2.7
    • setMaxTextCheckerThreads

      void setMaxTextCheckerThreads(int maxTextCheckerThreads)
      Parameters:
      maxTextCheckerThreads - The maximum number of threads in the worker pool processing text checks running at the same time.
      Since:
      5.6
    • getMaxTextCheckerThreads

      int getMaxTextCheckerThreads()
      Since:
      5.6
    • getTextCheckerQueueSize

      public int getTextCheckerQueueSize()
    • setTextCheckerQueueSize

      public void setTextCheckerQueueSize(int textCheckerQueueSize)
    • setTrustXForwardForHeader

      void setTrustXForwardForHeader(boolean trustXForwardForHeader)
      Set to true if this is running behind a (reverse) proxy which sets the X-forwarded-for HTTP header. The last IP address (but not local IP addresses) in that header will then be used for enforcing a request limitation.
      Since:
      2.8
    • getTrustXForwardForHeader

      boolean getTrustXForwardForHeader()
      Since:
      2.8
    • getMaxWorkQueueSize

      int getMaxWorkQueueSize()
      Since:
      2.9
    • isPipelineCachingEnabled

      public boolean isPipelineCachingEnabled()
      Since:
      4.4 Cache initialized JLanguageTool instances and share between non-parallel requests with identical parameters. Improves response time (especially when dealing with many small requests without specific settings), but increases memory usage
    • isPipelinePrewarmingEnabled

      public boolean isPipelinePrewarmingEnabled()
      Since:
      4.4 Before starting to listen for requests, create a few pipelines for frequently used request settings and run simple checks on them; prevents long response time / request overload on the first real incoming requests
    • getMaxPipelinePoolSize

      public int getMaxPipelinePoolSize()
      Since:
      4.4 Keep pipelines ready for this many different request settings
    • getPipelineExpireTime

      public int getPipelineExpireTime()
      Since:
      4.4 Expire pipelines for a specific request setting after this many seconds without any matching request elapsed
    • setPipelineCaching

      public void setPipelineCaching(boolean pipelineCaching)
      Since:
      4.4
    • setPipelinePrewarming

      public void setPipelinePrewarming(boolean pipelinePrewarming)
      Since:
      4.4
    • setMaxPipelinePoolSize

      public void setMaxPipelinePoolSize(int maxPipelinePoolSize)
      Since:
      4.4
    • setPipelineExpireTime

      public void setPipelineExpireTime(int pipelineExpireTime)
      Since:
      4.4
    • getCacheSize

      int getCacheSize()
      Cache size (in number of sentences).
      Since:
      3.7
    • setCacheSize

      void setCacheSize(int sentenceCacheSize)
      Set cache size (in number of sentences).
      Since:
      4.2
    • getCacheTTLSeconds

      long getCacheTTLSeconds()
      Cache entry TTL; refreshed on access; in seconds
      Since:
      4.6
    • setCacheTTLSeconds

      void setCacheTTLSeconds(long cacheTTLSeconds)
      Set cache entry TTL in seconds
      Since:
      4.6
    • getMaxErrorsPerWordRate

      float getMaxErrorsPerWordRate()
      Maximum errors per word rate, checking will stop if the rate is higher. For example, with a rate of 0.33, the checking would stop if the user's text has so many errors that more than every 3rd word causes a rule match. Note that this may not apply for very short texts.
      Since:
      4.0
    • getMaxSpellingSuggestions

      int getMaxSpellingSuggestions()
      Maximum number of spelling errors for which a suggestion will be generated per check. It makes sense to limit this as generating suggestions is a CPU-heavy task.
      Since:
      4.2
    • getBlockedReferrers

      @NotNull List<String> getBlockedReferrers()
      A list of HTTP referrers that are blocked and will only get an error message.
      Since:
      4.2
    • setBlockedReferrers

      void setBlockedReferrers(List<String> blockedReferrers)
      Since:
      4.2
    • getTrustedSources

      @Nullable public Pattern getTrustedSources()
    • setTrustedSources

      public void setTrustedSources(String pattern)
    • getRulesConfigFile

      @Nullable File getRulesConfigFile()
      Returns:
      the file from which server rules configuration should be loaded, or null
      Since:
      3.0
    • getRemoteRulesConfigFile

      @Nullable File getRemoteRulesConfigFile()
      Returns:
      the file from which remote rules should be configured, or null
      Since:
      4.9
    • getDatabaseDriver

      @Nullable String getDatabaseDriver()
      Returns:
      the database driver name like org.mariadb.jdbc.Driver, or null
      Since:
      4.2
    • setDatabaseDriver

      void setDatabaseDriver(String dbDriver)
      Since:
      4.2
    • getDatabaseUrl

      @Nullable String getDatabaseUrl()
      Returns:
      the database url like jdbc:mysql://localhost:3306/languagetool, or null
      Since:
      4.2
    • setDatabaseUrl

      void setDatabaseUrl(String dbUrl)
      Since:
      4.2
    • getDatabaseUsername

      @Nullable String getDatabaseUsername()
      Returns:
      the database username, or null
      Since:
      4.2
    • setDatabaseUsername

      void setDatabaseUsername(String dbUsername)
      Since:
      4.2
    • getDatabasePassword

      @Nullable String getDatabasePassword()
      Returns:
      the database password matching getDatabaseUsername(), or null
      Since:
      4.2
    • setDatabasePassword

      void setDatabasePassword(String dbPassword)
      Since:
      4.2
    • setDatabaseLogging

      void setDatabaseLogging(boolean logging)
      Whether meta data about each search (like in the logfile) should be logged to the database.
      Since:
      4.4
    • getDatabaseLogging

      boolean getDatabaseLogging()
      Since:
      4.4
    • getDbTimeoutSeconds

      public long getDbTimeoutSeconds()
      timeout for database requests (for now, only requests for credentials to log in)
      Since:
      4.7
    • setDbTimeoutSeconds

      public void setDbTimeoutSeconds(long dbTimeoutSeconds)
      timeout for database requests (for now, only requests for credentials to log in)
      Since:
      4.7
    • getDatabaseTimeoutRateThreshold

      public int getDatabaseTimeoutRateThreshold()
      Rate in percent of requests (0-100) of timeouts during database queries until circuit breaker opens
      Since:
      5.5
    • setDatabaseTimeoutRateThreshold

      public void setDatabaseTimeoutRateThreshold(int databaseTimeoutRateThreshold)
    • getDatabaseErrorRateThreshold

      public int getDatabaseErrorRateThreshold()
      Rate in percent of requests (0-100) of errors during database queries until circuit breaker opens
      Since:
      5.5
    • setDatabaseErrorRateThreshold

      public void setDatabaseErrorRateThreshold(int databaseErrorRateThreshold)
    • getDatabaseDownIntervalSeconds

      public int getDatabaseDownIntervalSeconds()
      Number of seconds to skip database requests when a potential downtime has been detected
      Since:
      5.5
    • setDatabaseDownIntervalSeconds

      public void setDatabaseDownIntervalSeconds(int databaseDownIntervalSeconds)
    • getGracefulDatabaseFailure

      public boolean getGracefulDatabaseFailure()
      Whether requests with credentials should be treated as anonymous requests in case of DB errors/timeout or throw an error
      Since:
      4.7
    • setGracefulDatabaseFailure

      public void setGracefulDatabaseFailure(boolean gracefulDatabaseFailure)
      Whether requests with credentials should be treated as anonymous requests in case of DB errors/timeout or throw an error
      Since:
      4.7
    • isPrometheusMonitoring

      public boolean isPrometheusMonitoring()
      Since:
      4.6
    • getPrometheusPort

      public int getPrometheusPort()
      Since:
      4.6
    • getRedisHost

      @Nullable public String getRedisHost()
    • getRedisPort

      public int getRedisPort()
    • getRedisDatabase

      public int getRedisDatabase()
    • isRedisUseSSL

      public boolean isRedisUseSSL()
    • getRedisPassword

      @Nullable public String getRedisPassword()
    • getRedisDictTTLSeconds

      public long getRedisDictTTLSeconds()
    • getRedisTimeoutMilliseconds

      public long getRedisTimeoutMilliseconds()
      Timeout for regular commands
      Returns:
    • getRedisConnectionMilliseconds

      public long getRedisConnectionMilliseconds()
      Timeout for establishing the initial connection, including e.g. SSL handshake and commands like SENTINEL, ...
    • getSlowRuleLoggingThreshold

      public int getSlowRuleLoggingThreshold()
      Returns:
      threshold for rule computation time until a warning gets logged, in milliseconds
      Since:
      4.5
    • isSkipLoggingRuleMatches

      boolean isSkipLoggingRuleMatches()
      Since:
      4.5
    • isSkipLoggingChecks

      public boolean isSkipLoggingChecks()
      Since:
      4.6
    • getDisabledRuleIds

      public List<String> getDisabledRuleIds()
      Since:
      4.7
    • isStoppable

      boolean isStoppable()
      Whether the server can be stopped by sending a command (useful for tests only).
    • getAbTest

      public List<String> getAbTest()
      Since:
      4.4 Get a list of active A/B-Tests
    • setAbTest

      public void setAbTest(@Nullable String abTest)
      Since:
      4.4 Enable A/B-Tests to be run (comma seperated for a list or null to disable all tests)
    • getAbTestClients

      @Experimental @Nullable public Pattern getAbTestClients()
      Clients that a A/B test runs on; null -> disabled
      Since:
      4.9
    • setAbTestClients

      @Experimental public void setAbTestClients(@Nullable String pattern)
      Clients that a A/B test runs on; null -> disabled
      Since:
      4.9
    • setAbTestRollout

      @Experimental public void setAbTestRollout(int abTestRollout)
      Parameters:
      abTestRollout - percentage [0,100] of users to include in ab test rollout
      Since:
      4.9
    • getAbTestRollout

      @Experimental public int getAbTestRollout()
      Since:
      4.9
    • setNgramLangIdentData

      public void setNgramLangIdentData(File ngramLangIdentData)
      Since:
      5.2
    • getNgramLangIdentData

      @Nullable public File getNgramLangIdentData()
      Since:
      5.2
    • getProperty

      protected String getProperty(Properties props, String propertyName, File config)
      Throws:
      IllegalConfigurationException - if property is not set
    • getOptionalProperty

      protected String getOptionalProperty(Properties props, String propertyName, String defaultValue)
    • isPremiumAlways

      boolean isPremiumAlways()
      Since:
      5.1
    • setPremiumAlways

      void setPremiumAlways(boolean premiumAlways)
      Since:
      5.1
    • isPremiumOnly

      public boolean isPremiumOnly()
    • isRedisUseSentinel

      public boolean isRedisUseSentinel()
      Allow using redis sentinel for automated failover
    • setRedisUseSentinel

      public void setRedisUseSentinel(boolean redisUseSentinel)
    • getSentinelHost

      public String getSentinelHost()
    • setSentinelHost

      public void setSentinelHost(String sentinelHost)
    • getSentinelPort

      public int getSentinelPort()
    • setSentinelPort

      public void setSentinelPort(int sentinelPort)
    • getSentinelPassword

      public String getSentinelPassword()
    • setSentinelPassword

      public void setSentinelPassword(String sentinelPassword)
    • getSentinelMasterId

      public String getSentinelMasterId()
    • setSentinelMasterId

      public void setSentinelMasterId(String sentinelMasterId)
    • getRedisCertificate

      public String getRedisCertificate()
    • setRedisCertificate

      public void setRedisCertificate(String redisCertificate)
    • getRedisKey

      public String getRedisKey()
    • setRedisKey

      public void setRedisKey(String redisKey)
    • getRedisKeyPassword

      public String getRedisKeyPassword()
    • setRedisKeyPassword

      public void setRedisKeyPassword(String redisKeyPassword)
    • getPasswortLoginAccessListPath

      public String getPasswortLoginAccessListPath()
    • isLocalApiMode

      public boolean isLocalApiMode()
    • getMotherTongue

      public String getMotherTongue()
    • getPreferedLanguages

      public List<String> getPreferedLanguages()
    • getDictLimitUser

      public int getDictLimitUser()
    • getDictLimitTeam

      public int getDictLimitTeam()
    • getStyleGuideLimitUser

      public int getStyleGuideLimitUser()
    • getStyleGuideLimitTeam

      public int getStyleGuideLimitTeam()
    • getDbMaxConnections

      public int getDbMaxConnections()
      Returns:
      max number of active connections in DB connection pool
      Since:
      6.2
    • setDbMaxConnections

      public void setDbMaxConnections(int dbMaxConnections)
      Parameters:
      dbMaxConnections - max number of active connections in DB connection pool
      Since:
      6.2
    • getRuleIdToConfidenceFile

      @Nullable public File getRuleIdToConfidenceFile()
      Since:
      6.4
    • getDefaultThirdPartyAI

      public boolean getDefaultThirdPartyAI()
    • setDefaultThirdPartyAI

      public void setDefaultThirdPartyAI(boolean defaultThirdPartyAI)