public abstract class ThriftServiceConfig extends BaseAppConfig implements ThriftServiceConstants
Context.Builder
defaultValue, logger, options
CONNECTION_LIMIT_OPTION_DESC, CONNECTION_LIMIT_OPTION_LONG, DEFAULT_CONNECTION_LIMIT, DEFAULT_IDLE_TIMEOUT, DEFAULT_STATIC_METHOD, IDLE_CONNECTION_TIMEOUT_OPTION_DESC, IDLE_CONNECTION_TIMEOUT_OPTION_LONG, SERVICE_PORT_OPTION_DESC, SERVICE_PORT_OPTION_LONG, WORK_THREADS_OPTION_DESC, WORK_THREADS_OPTION_LONG
CONTROL_OPTIONS, DEFINE_OPTION, DEFINE_OPTION_DESC, HELP_OPTION, HELP_OPTION_DESC, HELP_OPTION_LONG
Constructor and Description |
---|
ThriftServiceConfig(int defaultPort)
默认服务端口号
|
Modifier and Type | Method and Description |
---|---|
int |
getConnectionLimit() |
int |
getIdleConnectionTimeout() |
int |
getServicePort() |
int |
getWorkThreads() |
void |
loadConfig(org.apache.commons.cli.Options options,
org.apache.commons.cli.CommandLine cmd) |
getAppName, getCmdLineSyntax, getDefaultValueMap, getFooter, getHeader, getOptions, parseCommandLine
builder, getContext, getProperty, hasProperty, setProperties, setProperty
public ThriftServiceConfig(int defaultPort)
defaultPort
- public void loadConfig(org.apache.commons.cli.Options options, org.apache.commons.cli.CommandLine cmd) throws org.apache.commons.cli.ParseException
loadConfig
in interface CmdConfig
loadConfig
in class AbstractConfiguration
org.apache.commons.cli.ParseException
CmdConfig.loadConfig(Options, CommandLine)
public int getServicePort()
public int getWorkThreads()
public int getConnectionLimit()
public int getIdleConnectionTimeout()
Copyright © 2019. All rights reserved.