All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class interbase.interclient.ConnectionProperties

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

public final class ConnectionProperties
extends Properties
InterClient Extension

This class is used to tailor connection properties before attaching to an InterBase database.

See Also:
connect

Constructor Index

 o ConnectionProperties()
Construct a default InterBase connection properties object. InterClient Extension.

Method Index

 o activateShadow(boolean)
Activate the database shadow upon connection. Deprecated.
 o allowAsynchronousDiskWrites(boolean)
Enable/disable synchronous writes to disk on commit. InterClient Extension.
 o enableStructureVerification(boolean)
On connection, verify the database's internal structures. InterClient Extension.
 o reserveNoSpaceForVersioning(boolean)
Specify whether or not space is reserved on each newly created database page for anticipated record versions. InterClient Extension.
 o setCacheBuffers(int)
Set the suggested number of cache page buffers to use for this connection. Deprecated.
 o setExclusiveAccess(boolean)
Once a connection is established with this configuration, do not allow subsequent connections to the database. InterClient Extension.
 o setUser(String, String)
Set the user and password for the pending connection. InterClient Extension.

Constructors

 o ConnectionProperties
  public ConnectionProperties()
InterClient Extension

Construct a default InterBase connection properties object.

Methods

 o setUser
  public void setUser(String user,
                      String password) throws SQLException
InterClient Extension

Set the user and password for the pending connection.

Throws: SQLException
Not yet implemented.
 o setExclusiveAccess
  public void setExclusiveAccess(boolean exclusive) throws SQLException
InterClient Extension for future release

Once a connection is established with this configuration, do not allow subsequent connections to the database.

Throws: SQLException
Not yet implemented.
 o activateShadow
  public void activateShadow(boolean activate) throws SQLException
Note: activateShadow() is deprecated.

Activate the database shadow upon connection. By default, the shadow is not activated.

Throws: SQLException
Not yet implemented.
 o reserveNoSpaceForVersioning
  public void reserveNoSpaceForVersioning(boolean noreserve) throws SQLException
InterClient Extension for future release

Specify whether or not space is reserved on each newly created database page for anticipated record versions.

The default is to reserve space for back versions in a database. It's only if the database is mostly archival (read only loosely-speaking) that no reserve space is recommended.

Throws: SQLException
Not yet implemented.
See Also:
isSpaceReservedForVersioning
 o allowAsynchronousDiskWrites
  public void allowAsynchronousDiskWrites(boolean asynchronous) throws SQLException
InterClient Extension for future release

Enable/disable synchronous writes to disk on commit.

The default for Unix is asynchronous and for NT it is synchronous. I think it's this way because it was thought people with PCs power off their machines whereas Unix users usually perform an orderly shutdown.

There are two significant shortcomings of using asynchronous writes:

So there are risks for database corruption if async writes are being used. The window of risk is the amount of time it takes your OS to write pages to disk once we have written them out to the OS cache. While this may seem like a small window, imagine a system under full load, pages being constantly updated. At any given time you may lose power, and certain pages will not be written out, or even worse pages may be written which expect the presence of other pages.

Sometimes the loss of a page is easily recoverable, such as when a new record is added to a data page. You will merely lose that new record. Other times the damage could be more severe. Some things can be fixed by gfix -mend. If that doesn't work, sometimes data can be recovered from a damaged database by copying it to another database one table at a time. But you do have to face the possibility of complete non-recovery of the database, though this is relatively rare.

So to be safe, those using asynchronous write should use a UPS, or at the very least take a backup once a day and be prepared, in the worst case, to lose that day's changes.

Throws: SQLException
Not yet implemented.
See Also:
isSynchronous
 o enableStructureVerification
  public void enableStructureVerification(boolean verify) throws SQLException
InterClient Extension

On connection, verify the database's internal structures. By default, verification is not performed at connect time.

If the database structures are not verifiable then a SQLException will be thrown when the connection is attempted.

Throws: SQLException
Not yet implemented.
 o setCacheBuffers
  public void setCacheBuffers(int num) throws SQLException
Note: setCacheBuffers() is deprecated.

Set the suggested number of cache page buffers to use for this connection.

This is a transient property of the connection and is overridden by the database-wide default set by Server.setCacheBuffers(database), but takes precedence over the server-wide default set by ServerProperties.setDefaultCacheBuffers().

On SuperServer, if a database cache already exists due to another attachment to the database then the cache size may be increased but not decreased.

Note: This method may be deprecated because it jeopardizes the performance of the server. An arbitrary user can connect and reserve 200MB for foo.gdb while corporate.gdb is forced to accept less.

Throws: SQLException
Not yet implemented.
See Also:
getCacheBuffers, setCacheBuffers, setDefaultCacheBuffers

All Packages  Class Hierarchy  This Package  Previous  Next  Index