1.50.39

interbase.interclient
Class ServerProperties

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--java.util.Properties
                    |
                    +--interbase.interclient.ServerProperties

public final class ServerProperties
extends Properties

Properties used to tailor a server connection.

This class is used to tailor server connection properties before attaching to an InterBase service. Using this class is an alternative to configuring a java.util.Properties object directly. For example,

 Properties.put ("charSet", "SJIS");
 
is identical to
 ServerProperties.setCharacterEncoding ("SJIS");
 
.

Since:
Extension, proposed for future release, not yet supported
See Also:
Server.startup(interbase.interclient.ServerProperties), Serialized Form

Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
ServerProperties()
          Construct a default InterBase service configuration.
 
Method Summary
 void setCharacterEncoding(String encoding)
          Specify the character encoding for the server connection.
 void setDefaultCacheBuffers(int num)
          Set the default suggested number of cache buffers the server will use for database attachments.
 void setDefaultPageSize(int pageSize)
          Set the default page size that will be used by the Server.createDatabase() method.
 void setUser(String user, String password)
          Set the user and password for the pending server connection.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerProperties

public ServerProperties()
Construct a default InterBase service configuration.
Since:
Extension, proposed for future release, not yet supported
Method Detail

setUser

public void setUser(String user,
                    String password)
Set the user and password for the pending server connection.

The corresponding server connection property keys are "user" and "password".

Since:
Extension, proposed for future release, not yet supported

setCharacterEncoding

public void setCharacterEncoding(String encoding)
Specify the character encoding for the server connection. All data will be presented to the database using the specified character encoding.

The server connection property key is "charSet".

Property values must match one of the supported IANA character encoding names specified in the CharacterEncodings class.

Since:
Extension, proposed for future release, not yet supported

setDefaultPageSize

public void setDefaultPageSize(int pageSize)
Set the default page size that will be used by the Server.createDatabase() method.

The server property key is TBD.

Since:
Extension, proposed for future release, not yet supported
See Also:
Server.createDatabase(java.lang.String), Server.getDefaultPageSize(int)

setDefaultCacheBuffers

public void setDefaultCacheBuffers(int num)
Set the default suggested number of cache buffers the server will use for database attachments.

Database cache is the number of memory pages reserved for each attached database. If the figure is set high enough to accommodate the page requirements for all attached databases, overall performance is maximized because all database activity can be handled in physical RAM rather than having it swapped to disk. If too many pages are reserved, however, and you have many databases running simultaneously, your request may exceed the amount of physical RAM available to the system. If that happens, some of your operations would be swapped to disk as the operating system tries to manage the excessive demands of your databases and the needs of other running applications (including itself).

To calculate the amount of memory required by a database, multiply the number of pages by the page size (these figures are defined when a database is created).

On Classic, the default page allocation is 75 for each connection. Minimum is 50 pages. There is no maximum, but the total allocation must not exceed system resources (see discussion above). Changes take effect in all calls made after the DBA presses either OK or Apply.

On Superserver, a single page buffer cache is allocated per database, and shared between connections. The default allocation is 256.

There are 3 ways to programmatically specify the number of cache buffers:

Cache buffers may also be set manually in the server's isc_config file by assigning the configuration parameter DATABASE_CACHE_PAGES. This manual server-wide setting takes precedence over any programmatic server-wide setting, but is overriden by the database-wide and connection-wide programmatic settings.

The server property key is TBD.

Since:
Extension, proposed for future release, not yet supported
See Also:
Server.getDefaultCacheBuffers(), Server.setCacheBuffers(java.lang.String, int), ConnectionProperties.setCacheBuffers(int), DatabaseMetaData.getCacheBuffers()

1.50.39

Send comments or suggestions to icsupport@interbase.com