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 void
addConfigurationItem(ServerConfigurationItem configItem)
adds ConfigurationItems to be applied when an ObjectServer is opened.void
applyConfigurationItems(ObjectServer server)
CacheConfiguration
cache()
Access to the cache-related configuration methods.CommonConfiguration
common()
Access to the common configuration methods.FileConfiguration
file()
Access to the file-related configuration methods.IdSystemConfiguration
idSystem()
Access to the IdSystem-related configuration methods.int
timeoutServerSocket()
void
timeoutServerSocket(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:CacheConfigurationProvider
Access to the cache-related configuration methods.- Specified by:
cache
in interfaceCacheConfigurationProvider
-
file
public FileConfiguration file()
Description copied from interface:FileConfigurationProvider
Access to the file-related configuration methods.- Specified by:
file
in interfaceFileConfigurationProvider
-
common
public CommonConfiguration common()
Description copied from interface:CommonConfigurationProvider
Access to the common configuration methods.- Specified by:
common
in interfaceCommonConfigurationProvider
-
timeoutServerSocket
public void timeoutServerSocket(int milliseconds)
Description copied from interface:ServerConfiguration
configures 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:
timeoutServerSocket
in interfaceServerConfiguration
- Parameters:
milliseconds
- time in milliseconds
-
timeoutServerSocket
public int timeoutServerSocket()
-
addConfigurationItem
public void addConfigurationItem(ServerConfigurationItem configItem)
Description copied from interface:ServerConfiguration
adds ConfigurationItems to be applied when an ObjectServer is opened.- Specified by:
addConfigurationItem
in interfaceServerConfiguration
- Parameters:
configItem
- theServerConfigurationItem
-
applyConfigurationItems
public void applyConfigurationItems(ObjectServer server)
-
idSystem
public IdSystemConfiguration idSystem()
Description copied from interface:IdSystemConfigurationProvider
Access to the IdSystem-related configuration methods.- Specified by:
idSystem
in interfaceIdSystemConfigurationProvider
-
-