Package com.db4o.cs.internal.config
Class ServerConfigurationImpl
- java.lang.Object
-
- com.db4o.cs.internal.config.NetworkingConfigurationProviderImpl
-
- com.db4o.cs.internal.config.ServerConfigurationImpl
-
- All Implemented Interfaces:
CacheConfigurationProvider,CommonConfigurationProvider,FileConfigurationProvider,IdSystemConfigurationProvider,NetworkingConfigurationProvider,ServerConfiguration,LegacyConfigurationProvider
public class ServerConfigurationImpl extends NetworkingConfigurationProviderImpl implements ServerConfiguration
-
-
Constructor Summary
Constructors Constructor Description ServerConfigurationImpl(Config4Impl config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConfigurationItem(ServerConfigurationItem configItem)adds ConfigurationItems to be applied when an ObjectServer is opened.voidapplyConfigurationItems(ObjectServer server)CacheConfigurationcache()Access to the cache-related configuration methods.CommonConfigurationcommon()Access to the common configuration methods.FileConfigurationfile()Access to the file-related configuration methods.IdSystemConfigurationidSystem()Access to the IdSystem-related configuration methods.inttimeoutServerSocket()voidtimeoutServerSocket(int milliseconds)configures the timeout of the server side socket.-
Methods inherited from class com.db4o.cs.internal.config.NetworkingConfigurationProviderImpl
legacy, networking
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.db4o.cs.config.NetworkingConfigurationProvider
networking
-
-
-
-
Constructor Detail
-
ServerConfigurationImpl
public ServerConfigurationImpl(Config4Impl config)
-
-
Method Detail
-
cache
public CacheConfiguration cache()
Description copied from interface:CacheConfigurationProviderAccess to the cache-related configuration methods.- Specified by:
cachein interfaceCacheConfigurationProvider
-
file
public FileConfiguration file()
Description copied from interface:FileConfigurationProviderAccess to the file-related configuration methods.- Specified by:
filein interfaceFileConfigurationProvider
-
common
public CommonConfiguration common()
Description copied from interface:CommonConfigurationProviderAccess to the common configuration methods.- Specified by:
commonin interfaceCommonConfigurationProvider
-
timeoutServerSocket
public void timeoutServerSocket(int milliseconds)
Description copied from interface:ServerConfigurationconfigures the timeout of the server side socket.
The server side handler waits for messages to arrive from the client. If no more messages arrive for the duration configured in this setting, the client will be disconnected.
Clients send PING messages to the server at an interval of Math.min(timeoutClientSocket(), timeoutServerSocket()) / 2 and the server will respond to keep connections alive.
Decrease this setting if you want clients to disconnect faster.
Increase this setting if you have a large number of clients and long running queries and you are getting disconnected clients that you would like to wait even longer for a response from the server.
Default value: 600000ms (10 minutes)
It is recommended to use the same values forClientConfiguration.timeoutClientSocket(int)andServerConfiguration.timeoutServerSocket(int).
This setting can be used on both client and server.- Specified by:
timeoutServerSocketin interfaceServerConfiguration- Parameters:
milliseconds- time in milliseconds
-
timeoutServerSocket
public int timeoutServerSocket()
-
addConfigurationItem
public void addConfigurationItem(ServerConfigurationItem configItem)
Description copied from interface:ServerConfigurationadds ConfigurationItems to be applied when an ObjectServer is opened.- Specified by:
addConfigurationItemin interfaceServerConfiguration- Parameters:
configItem- theServerConfigurationItem
-
applyConfigurationItems
public void applyConfigurationItems(ObjectServer server)
-
idSystem
public IdSystemConfiguration idSystem()
Description copied from interface:IdSystemConfigurationProviderAccess to the IdSystem-related configuration methods.- Specified by:
idSystemin interfaceIdSystemConfigurationProvider
-
-