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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddSetting, 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, setSettingpublic DefaultRsfSettings(Settings settings) throws IOException
IOExceptionpublic int getDefaultTimeout()
RsfSettingsgetDefaultTimeout in interface RsfSettingspublic RsfOptionSet getServerOption()
RsfSettingsgetServerOption in interface RsfSettingspublic RsfOptionSet getClientOption()
RsfSettingsgetClientOption in interface RsfSettingspublic String getDefaultGroup()
RsfSettingsgetDefaultGroup in interface RsfSettingspublic String getDefaultVersion()
RsfSettingsgetDefaultVersion in interface RsfSettingspublic String getDefaultSerializeType()
RsfSettingsgetDefaultSerializeType in interface RsfSettingspublic int getQueueMaxSize()
RsfSettingsgetQueueMaxSize in interface RsfSettingspublic int getQueueMinPoolSize()
RsfSettingsgetQueueMinPoolSize in interface RsfSettingspublic int getQueueMaxPoolSize()
RsfSettingsgetQueueMaxPoolSize in interface RsfSettingspublic long getQueueKeepAliveTime()
RsfSettingsgetQueueKeepAliveTime in interface RsfSettingspublic int getRequestTimeout()
RsfSettingsgetRequestTimeout in interface RsfSettingspublic int getMaximumRequest()
RsfSettingsgetMaximumRequest in interface RsfSettingspublic SendLimitPolicy getSendLimitPolicy()
RsfSettingsgetSendLimitPolicy in interface RsfSettingspublic int getConnectTimeout()
RsfSettingsgetConnectTimeout in interface RsfSettingspublic String getBindAddress()
RsfSettingsgetBindAddress in interface RsfSettingspublic String getDefaultProtocol()
RsfSettingsgetDefaultProtocol in interface RsfSettingspublic Set<String> getProtocos()
RsfSettingsgetProtocos in interface RsfSettingspublic InterAddress getBindAddressSet(String protocolName)
RsfSettingsgetBindAddressSet in interface RsfSettingspublic String getProtocolConfigKey(String protocolName)
RsfSettingsgetProtocolConfigKey in interface RsfSettingspublic String getUnitName()
RsfSettingsgetUnitName in interface RsfSettingspublic long getInvalidWaitTime()
RsfSettingsgetInvalidWaitTime in interface RsfSettingspublic long getRefreshCacheTime()
RsfSettingsgetRefreshCacheTime in interface RsfSettingspublic long getDiskCacheTimeInterval()
RsfSettingsgetDiskCacheTimeInterval in interface RsfSettingspublic boolean islocalDiskCache()
RsfSettingsislocalDiskCache in interface RsfSettingspublic boolean isAutomaticOnline()
RsfSettingsisAutomaticOnline in interface RsfSettingspublic void refresh()
throws IOException
Settingsrefresh in interface Settingsrefresh in class SettingsWrapIOExceptionpublic void refreshRsfConfig()
throws IOException
RsfSettingsrefreshRsfConfig in interface RsfSettingsIOExceptionCopyright © 2020. All rights reserved.