public class DefaultRsfSettings extends SettingsWrap implements RsfSettings
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
DefaultCharset, DefaultNameSpace
Constructor and Description |
---|
DefaultRsfSettings(Settings settings) |
Modifier and Type | Method and Description |
---|---|
String |
getBindAddress()
获取本地服务绑定地址
|
InterAddress |
getBindAddressSet(String protocolName)
获取本地服务绑定地址
|
RsfOptionSet |
getClientOption()
获取配置的客户端选项
|
int |
getConnectTimeout()
客户端发起一个连接请求所允许的最大耗时(单位毫秒)
|
String |
getDefaultGroup()
获取默认超时时间。
|
String |
getDefaultProtocol()
获取默认传输协议
|
String |
getDefaultSerializeType()
获取默认超时时间。
|
int |
getDefaultTimeout()
获取默认超时时间。
|
String |
getDefaultVersion()
获取默认超时时间。
|
long |
getDiskCacheTimeInterval()
每次缓存地址本到磁盘时的时间间隔(单位:毫秒)默认:1小时
|
long |
getInvalidWaitTime()
获取地址失效之后,等待重新尝试连接的时间(毫秒)。默认60秒。
|
int |
getMaximumRequest()
最大并发请求数
|
String |
getProtocolConfigKey(String protocolName)
获取协议配置节点名
|
Set<String> |
getProtocos()
可使用的协议名集合
|
long |
getQueueKeepAliveTime()
(SECONDS),when the number of threads is greater than the core, this is the maximum time that excess idle threads will wait for new tasks before terminating.
|
int |
getQueueMaxPoolSize()
the maximum number of threads to allow in the pool.
|
int |
getQueueMaxSize()
处理任务队列的最大大小,作为服务端当队列满了之后所有新进来的请求都会被回应 ChooseOther
|
int |
getQueueMinPoolSize()
the number of threads to keep in the pool, even if they are idle, unless allowCoreThreadTimeOut is set.
|
long |
getRefreshCacheTime()
自动刷新地址本缓存的时间,默认6分钟。
|
int |
getRequestTimeout()
客户端请求超时时间
|
SendLimitPolicy |
getSendLimitPolicy()
并发调用请求限制策略,当并发调用达到限制值后的策略(Reject 抛出异常,WaitSecond 等待1秒重试)
|
RsfOptionSet |
getServerOption()
获取配置的服务器端选项
|
String |
getUnitName()
获取本机所属单元
|
boolean |
isAutomaticOnline()
应用自动上线
|
boolean |
islocalDiskCache()
启用磁盘地址本缓存,在refreshCacheTime期间每隔1小时自动写入一次。(被回收的服务不享受此待遇)
|
void |
refresh()
强制重新装载配置文件。
|
void |
refreshRsfConfig()
重新加载Rsf配置
|
addSetting, addSetting, getBoolean, getBoolean, getBooleanArray, getBooleanArray, getChar, getChar, getCharArray, getCharArray, getDate, getDate, getDate, getDate, getDate, getDate, getDateArray, getDateArray, getDateArray, getDateArray, getDateArray, getDateArray, getDirectoryPath, getDirectoryPath, getDirectoryPathArray, getDirectoryPathArray, getDouble, getDouble, getDoubleArray, getDoubleArray, getEnum, getEnum, getEnumArray, getEnumArray, getFilePath, getFilePath, getFilePathArray, getFilePathArray, getFloat, getFloat, getFloatArray, getFloatArray, getInteger, getInteger, getIntegerArray, getIntegerArray, getLong, getLong, getLongArray, getLongArray, getSettingArray, getSettings, getSettings, getShort, getShort, getShortArray, getShortArray, getString, getString, getStringArray, getStringArray, getXmlNode, getXmlNodeArray, removeSetting, removeSetting, setSetting, setSetting, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addSetting, addSetting, getBoolean, getBoolean, getBooleanArray, getBooleanArray, getChar, getChar, getCharArray, getCharArray, getDate, getDate, getDate, getDate, getDate, getDate, getDateArray, getDateArray, getDateArray, getDateArray, getDateArray, getDateArray, getDirectoryPath, getDirectoryPath, getDirectoryPathArray, getDirectoryPathArray, getDouble, getDouble, getDoubleArray, getDoubleArray, getEnum, getEnum, getEnumArray, getEnumArray, getFilePath, getFilePath, getFilePathArray, getFilePathArray, getFloat, getFloat, getFloatArray, getFloatArray, getInteger, getInteger, getIntegerArray, getIntegerArray, getLong, getLong, getLongArray, getLongArray, getSettingArray, getSettings, getShort, getShort, getShortArray, getShortArray, getString, getString, getStringArray, getStringArray, getXmlNode, getXmlNodeArray, removeSetting, removeSetting, setSetting, setSetting
public DefaultRsfSettings(Settings settings) throws IOException
IOException
public int getDefaultTimeout()
RsfSettings
getDefaultTimeout
in interface RsfSettings
public RsfOptionSet getServerOption()
RsfSettings
getServerOption
in interface RsfSettings
public RsfOptionSet getClientOption()
RsfSettings
getClientOption
in interface RsfSettings
public String getDefaultGroup()
RsfSettings
getDefaultGroup
in interface RsfSettings
public String getDefaultVersion()
RsfSettings
getDefaultVersion
in interface RsfSettings
public String getDefaultSerializeType()
RsfSettings
getDefaultSerializeType
in interface RsfSettings
public int getQueueMaxSize()
RsfSettings
getQueueMaxSize
in interface RsfSettings
public int getQueueMinPoolSize()
RsfSettings
getQueueMinPoolSize
in interface RsfSettings
public int getQueueMaxPoolSize()
RsfSettings
getQueueMaxPoolSize
in interface RsfSettings
public long getQueueKeepAliveTime()
RsfSettings
getQueueKeepAliveTime
in interface RsfSettings
public int getRequestTimeout()
RsfSettings
getRequestTimeout
in interface RsfSettings
public int getMaximumRequest()
RsfSettings
getMaximumRequest
in interface RsfSettings
public SendLimitPolicy getSendLimitPolicy()
RsfSettings
getSendLimitPolicy
in interface RsfSettings
public int getConnectTimeout()
RsfSettings
getConnectTimeout
in interface RsfSettings
public String getBindAddress()
RsfSettings
getBindAddress
in interface RsfSettings
public String getDefaultProtocol()
RsfSettings
getDefaultProtocol
in interface RsfSettings
public Set<String> getProtocos()
RsfSettings
getProtocos
in interface RsfSettings
public InterAddress getBindAddressSet(String protocolName)
RsfSettings
getBindAddressSet
in interface RsfSettings
public String getProtocolConfigKey(String protocolName)
RsfSettings
getProtocolConfigKey
in interface RsfSettings
public String getUnitName()
RsfSettings
getUnitName
in interface RsfSettings
public long getInvalidWaitTime()
RsfSettings
getInvalidWaitTime
in interface RsfSettings
public long getRefreshCacheTime()
RsfSettings
getRefreshCacheTime
in interface RsfSettings
public long getDiskCacheTimeInterval()
RsfSettings
getDiskCacheTimeInterval
in interface RsfSettings
public boolean islocalDiskCache()
RsfSettings
islocalDiskCache
in interface RsfSettings
public boolean isAutomaticOnline()
RsfSettings
isAutomaticOnline
in interface RsfSettings
public void refresh() throws IOException
Settings
refresh
in interface Settings
refresh
in class SettingsWrap
IOException
public void refreshRsfConfig() throws IOException
RsfSettings
refreshRsfConfig
in interface RsfSettings
IOException
Copyright © 2020. All rights reserved.