db4o 6.1

com.db4o.config
Interface ClientServerConfiguration


public interface ClientServerConfiguration

Client/Server configuration interface.


Method Summary
 void batchMessages(boolean flag)
          Configures to batch messages between client and server.
 MessageSender getMessageSender()
          returns the MessageSender for this Configuration context.
 void maxBatchQueueSize(int maxSize)
          Configures the maximum memory buffer size for batched message.
 void prefetchIDCount(int prefetchIDCount)
          Sets the number of IDs to be prefetched for an ObjectSet in C/S mode
 void prefetchObjectCount(int prefetchObjectCount)
          Sets the number of objects to be prefetched for an ObjectSet in C/S mode
 void setMessageRecipient(MessageRecipient messageRecipient)
          sets the MessageRecipient to receive Client Server messages.
 void singleThreadedClient(boolean flag)
          configures the client messaging system to be single threaded or multithreaded.
 void timeoutClientSocket(int milliseconds)
          configures the time a client waits for a message response from the server.
 void timeoutPingClients(int milliseconds)
          configures the delay time after which the server starts pinging connected clients to check the connection.
 void timeoutServerSocket(int milliseconds)
          configures the timeout of the serverside socket.
 

Method Detail

prefetchIDCount

void prefetchIDCount(int prefetchIDCount)
Sets the number of IDs to be prefetched for an ObjectSet in C/S mode

Parameters:
prefetchIDCount - The number of IDs to be prefetched

prefetchObjectCount

void prefetchObjectCount(int prefetchObjectCount)
Sets the number of objects to be prefetched for an ObjectSet in C/S mode

Parameters:
prefetchObjectCount - The number of objects to be prefetched

setMessageRecipient

void setMessageRecipient(MessageRecipient messageRecipient)
sets the MessageRecipient to receive Client Server messages.

Parameters:
messageRecipient - the MessageRecipient to be used

getMessageSender

MessageSender getMessageSender()
returns the MessageSender for this Configuration context.

Returns:
MessageSender

timeoutClientSocket

void timeoutClientSocket(int milliseconds)
configures the time a client waits for a message response from the server.

Default value: 300000ms (5 minutes)

Parameters:
milliseconds - time in milliseconds

timeoutServerSocket

void timeoutServerSocket(int milliseconds)
configures the timeout of the serverside socket.

All server connection threads jump out of the socket read statement on a regular interval to check if the server was shut down. Use this method to configure the duration of the interval.

Default value: 5000ms (5 seconds)

Parameters:
milliseconds - time in milliseconds

timeoutPingClients

void timeoutPingClients(int milliseconds)
configures the delay time after which the server starts pinging connected clients to check the connection.

If no client messages are received by the server for the configured interval, the server sends a "PING" message to the client and wait's for an "OK" response. After 5 unsuccessful attempts, the client connection is closed.

This value may need to be increased for single-threaded clients, since they can't respond instantaneously.

Default value: 180000ms (3 minutes)

Parameters:
milliseconds - time in milliseconds
See Also:
singleThreadedClient(boolean)

singleThreadedClient

void singleThreadedClient(boolean flag)
configures the client messaging system to be single threaded or multithreaded.

Recommended settings:
- true for low ressource systems.
- false for best asynchronous performance and fast GUI response.

Default value:
- .NET Compactframework: true
- all other plaforms: false

Parameters:
flag - the desired setting

batchMessages

void batchMessages(boolean flag)
Configures to batch messages between client and server. By default, batch mode is disabled.

Parameters:
flag - true for batching messages.

maxBatchQueueSize

void maxBatchQueueSize(int maxSize)
Configures the maximum memory buffer size for batched message. If the size of batched messages is greater than maxSize, batched messages will be sent to server.

Parameters:
maxSize -

db4o 6.1