com.marklogic.xdmp
Class XDMPConnection

java.lang.Object
  extended bycom.marklogic.xdmp.XDMPConnection
All Implemented Interfaces:
XDBCConnection

public class XDMPConnection
extends Object
implements XDBCConnection

A connection (session) with a specific contentbase and port. Within the context of an XDBCConnection, XQuery statements are executed and results are returned.

An XDBCConnection's contentbase will provide information describing its XQuery compliance level and the capabilities of the connection with the 'getMetaData' method.

An XDMPConnection is threadsafe. It represents a socket, and each socket is pooled and assigned an XDMPConnection whenever it executes a query. Therefore, it is OK to share database connections across threads.


Field Summary
 
Fields inherited from interface com.marklogic.xdbc.XDBCConnection
XDBC_TRANSACTION_NONE, XDBC_TRANSACTION_READ_COMMITTED, XDBC_TRANSACTION_READ_UNCOMMITTED, XDBC_TRANSACTION_REPEATABLE_READ, XDBC_TRANSACTION_SERIALIZABLE
 
Constructor Summary
XDMPConnection(String host, int port)
          Constructor for XDMPConnection object.
XDMPConnection(String host, int port, String prompt)
          Constructor for XDMPConnection object.
XDMPConnection(String host, int port, String user, String password)
          Constructor for XDMPConnection object.
 
Method Summary
 void clearWarnings()
          Clears all warnings reported for this XDBCConnection object.
 void close()
          Releases a XDBCConnection's database and XDBC resources immediately instead of waiting for them to be automatically released.
 void commit()
          NOTE: This method is NOT currently supported.
 XDBCStatement createStatement()
          Creates a Statement object for sending XQuery expressions to the database.
protected  void finalize()
          Finalizer for XDMPConnection.
 boolean getAutoCommit()
          Gets the current auto-commit state of this connection.
 String getHost()
          Gets the host associated with this connection.
 Locale getLocale()
          Gets the locale associated with this database connection.
static int getMaxOpenDocInsertStreams()
          Returns the maximum allowable number of open doc insert stream objects at any one time.
static int getMaxOpenResultSequences()
          Returns the maximum allowable number of open result sequence objects at any one time
 XDBCDatabaseMetaData getMetaData()
          Gets the metadata regarding this connection's database.
 int getPort()
          Gets the port number of this connection.
 TimeZone getTimeZone()
          Gets the timezone associated with this database connection.
 int getTransactionIsolation()
          Return the database's default transaction isolation level.
 XDBCWarning getWarnings()
          Returns the first warning reported by calls on this XDMPConnection.
 boolean isClosed()
          Tests if this XDBCConnection is closed.
 boolean isReadOnly()
          Tests if this XDBCConnection is in read-only mode.
 XDMPDocInsertStream openDocInsertStream()
          Opens a document insert stream to insert multiple documents in the database in a single transaction.
 XDMPDocInsertStream openDocInsertStream(String uri)
          Opens a document insert stream to insert a document in the database.
 XDMPDocInsertStream openDocInsertStream(String uri, Locale locale)
          Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions
 XDMPDocInsertStream openDocInsertStream(String uri, Locale locale, boolean resolveEntities)
          Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions
 XDMPDocInsertStream openDocInsertStream(String uri, Locale locale, boolean resolveEntities, String[] collections)
          Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions
 XDMPDocInsertStream openDocInsertStream(String uri, Locale locale, boolean resolveEntities, XDMPPermission[] permissions)
          Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions
 XDMPDocInsertStream openDocInsertStream(String uri, Locale locale, boolean resolveEntities, XDMPPermission[] permissions, String[] collections)
          Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions
 XDMPDocInsertStream openDocInsertStream(String uri, Locale locale, boolean resolveEntities, XDMPPermission[] permissions, String[] collections, int quality, String namespace, int repair)
          Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions
 XDMPDocInsertStream openDocInsertStream(String uri, Locale locale, boolean resolveEntities, XDMPPermission[] permissions, String[] collections, int quality, String namespace, int repair, String[] placeKeys)
          Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions
 XDMPDocInsertStream openDocInsertStream(String uri, Locale locale, boolean resolveEntities, XDMPPermission[] permissions, String[] collections, int quality, String namespace, int repair, String[] placeKeys, int format, String language)
          Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions
 XDMPDocInsertStream openDocInsertStream(String uri, XDMPDocOptions docOpts)
          Opens a document insert stream to insert a document in the database.
 void rollback()
          NOTE: This method is NOT currently supported.
 void setAutoCommit(boolean autoCommit)
          NOTE: This method is NOT currently supported.
 void setLocale(Locale locale)
          Sets the locale for this connection object.
static void setMaxOpenDocInsertStreams(int n)
          Sets the maximum allowable number of open doc insert stream objects at any one time.
static void setMaxOpenResultSequences(int n)
          Sets the maximum allowable number of open result sequence objects at any one time.
 void setReadOnly(boolean readOnly)
          NOTE: This method is NOT currently supported.
 void setTimeZone(TimeZone tz)
          Sets the timezone for this connection object.
 void setTransactionIsolation(int level)
          NOTE: This method is NOT currently supported.
 String toString()
          Returns a string representation of the connection object.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XDMPConnection

public XDMPConnection(String host,
                      int port,
                      String prompt)
               throws XDBCException
Constructor for XDMPConnection object.

Parameters:
host - a valid hostname with a Mark Logic XDMP server installed and running
port - the port number of the Mark Logic XDMP server.
prompt - a prompt provided to select the appropriate credentials to use.
Throws:
XDBCException - if a database connection error occurs.
See Also:
XDMPAuthenticator.setCredentials(java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)

XDMPConnection

public XDMPConnection(String host,
                      int port)
               throws XDBCException
Constructor for XDMPConnection object.

Parameters:
host - a valid hostname with a Mark Logic XDMP server installed and running
port - the port number of the Mark Logic XDMP server.
Throws:
XDBCException - if a database connection error occurs.

XDMPConnection

public XDMPConnection(String host,
                      int port,
                      String user,
                      String password)
               throws XDBCException
Constructor for XDMPConnection object.

Parameters:
host - a valid hostname with a Mark Logic XDMP server installed and running
port - the port number of the Mark Logic XDMP server.
user - the user to connect as.
password - the password to connect with.
Throws:
XDBCException - if a database connection error occurs.
See Also:
XDMPAuthenticator.setCredentials(java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)
Method Detail

finalize

protected void finalize()
Finalizer for XDMPConnection.


close

public void close()
           throws XDBCException
Releases a XDBCConnection's database and XDBC resources immediately instead of waiting for them to be automatically released. This does not necessarily close statements and result sequences generated from the connection.

Specified by:
close in interface XDBCConnection
Throws:
XDBCException - if a database access error occurs.

commit

public void commit()
            throws XDBCException

NOTE: This method is NOT currently supported.

Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the connection.

Specified by:
commit in interface XDBCConnection
Throws:
XDBCException - if a database access error occurs.

createStatement

public XDBCStatement createStatement()
                              throws XDBCException
Creates a Statement object for sending XQuery expressions to the database.

Specified by:
createStatement in interface XDBCConnection
Returns:
a new XDBCStatement object.
Throws:
XDBCException - if a database access error occurs.

openDocInsertStream

public XDMPDocInsertStream openDocInsertStream()
                                        throws XDBCException
Opens a document insert stream to insert multiple documents in the database in a single transaction. Each successive document needs to be started by calling newDocument(). To commit all documents, call commit().

Returns:
XDMPDocInsertStream object to use for inserting.
Throws:
XDBCException - if a database access error occurs.
See Also:
XDMPDocInsertStream.newDocument(String, com.marklogic.xdmp.XDMPDocOptions), XDMPDocInsertStream.commit()

openDocInsertStream

public XDMPDocInsertStream openDocInsertStream(String uri)
                                        throws XDBCException
Opens a document insert stream to insert a document in the database. If multiple documents need to be inserted, a new stream should be opened for each document.

Parameters:
uri - a URI by which the document will be known to the database after it is inserted.
Returns:
XDMPDocInsertStream object to use for inserting.
Throws:
XDBCException - if a database access error occurs.

openDocInsertStream

public XDMPDocInsertStream openDocInsertStream(String uri,
                                               XDMPDocOptions docOpts)
                                        throws XDBCException
Opens a document insert stream to insert a document in the database. If multiple documents need to be inserted, a new stream should be opened for each document.

Parameters:
uri - a URI by which the document will be known to the database after it is inserted.
docOpts - an XDMPDocOptions object to use when loading the document. The XDMPDocOptions object contains options to set for the document when it is loaded.
Returns:
XDMPDocInsertStream object to use for inserting.
Throws:
XDBCException - if a database access error occurs.
See Also:
XDMPDocOptions

openDocInsertStream

public XDMPDocInsertStream openDocInsertStream(String uri,
                                               Locale locale)
                                        throws XDBCException
Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions

Opens a document insert stream to insert a document in the database. If multiple documents need to be inserted, a new stream should be opened for each document.

Parameters:
uri - a URI by which the document will be known to the database after it is inserted.
locale - a locale to use when loading the document. If null, the default Java virtual machine locale is used.
Returns:
XDMPDocInsertStream object to use for inserting.
Throws:
XDBCException - if a database access error occurs.

openDocInsertStream

public XDMPDocInsertStream openDocInsertStream(String uri,
                                               Locale locale,
                                               boolean resolveEntities)
                                        throws XDBCException
Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions

Opens a document insert stream to insert a document in the database. If multiple documents need to be inserted, a new stream should be opened for each document.

Parameters:
uri - a URI by which the document will be known to the database after it is inserted.
locale - a locale to use when loading the document. If null, the default Java virtual machine local is used.
resolveEntities - boolean if true, external entities embedded in the document should be resolved. The default is false.
Returns:
XDMPDocInsertStream object to use for inserting.
Throws:
XDBCException - if a database access error occurs.

openDocInsertStream

public XDMPDocInsertStream openDocInsertStream(String uri,
                                               Locale locale,
                                               boolean resolveEntities,
                                               XDMPPermission[] permissions)
                                        throws XDBCException
Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions

Opens a document insert stream to insert a document in the database. If multiple documents need to be inserted, a new stream should be opened for each document.

Parameters:
uri - a URI by which the document will be known to the database after it is inserted.
locale - a locale to use when loading the document. If null, the default Java virtual machine local is used.
resolveEntities - boolean if true, external entities embedded in the document should be resolved. The default is false.
permissions - specifies the permissions on the document. An empty array indicates no permissions and null causes the server defaults to be used.
Returns:
XDMPDocInsertStream object to use for inserting.
Throws:
XDBCException - if a database access error occurs.

openDocInsertStream

public XDMPDocInsertStream openDocInsertStream(String uri,
                                               Locale locale,
                                               boolean resolveEntities,
                                               String[] collections)
                                        throws XDBCException
Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions

Opens a document insert stream to insert a document in the database. If multiple documents need to be inserted, a new stream should be opened for each document.

Parameters:
uri - a URI by which the document will be known to the database after it is inserted.
locale - a locale to use when loading the document. If null, the default Java virtual machine local is used.
resolveEntities - boolean if true, external entities embedded in the document should be resolved. The default is false.
collections - specifies the collections for the document. An empty array indicates no collections and null causes the server defaults to be used.
Returns:
XDMPDocInsertStream object to use for inserting.
Throws:
XDBCException - if a database access error occurs.

openDocInsertStream

public XDMPDocInsertStream openDocInsertStream(String uri,
                                               Locale locale,
                                               boolean resolveEntities,
                                               XDMPPermission[] permissions,
                                               String[] collections)
                                        throws XDBCException
Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions

Opens a document insert stream to insert a document in the database. If multiple documents need to be inserted, a new stream should be opened for each document.

Parameters:
uri - a URI by which the document will be known to the database after it is inserted.
locale - a locale to use when loading the document. If null, the default Java virtual machine local is used.
resolveEntities - boolean if true, external entities embedded in the document should be resolved. The default is false.
permissions - specifies the permissions on the document. An empty array indicates no permissions and null causes the server defaults to be used.
collections - specifies the collections for the document. An empty array indicates no collections and null causes the server defaults to be used.
Returns:
XDMPDocInsertStream object to use for inserting.
Throws:
XDBCException - if a database access error occurs.

openDocInsertStream

public XDMPDocInsertStream openDocInsertStream(String uri,
                                               Locale locale,
                                               boolean resolveEntities,
                                               XDMPPermission[] permissions,
                                               String[] collections,
                                               int quality,
                                               String namespace,
                                               int repair)
                                        throws XDBCException
Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions

Opens a document insert stream to insert a document in the database. If multiple documents need to be inserted, a new stream should be opened for each document.

Parameters:
uri - a URI by which the document will be known to the database after it is inserted.
locale - a locale to use when loading the document. If null, the default Java virtual machine local is used.
resolveEntities - boolean if true, external entities embedded in the document should be resolved. The default is false.
permissions - specifies the permissions on the document. An empty array indicates no permissions and null causes the server defaults to be used.
collections - specifies the collections for the document. An empty array indicates no collections and null causes the server defaults to be used.
quality - specifies the integer quality value to assign to the document being loaded. The default value is 0.
namespace - specifies the namespace for elements in the document being loaded. If null, the default namespace is used.
repair - the level of error correction to be performed on the document being loaded. Default is XDMP_ERROR_CORRECTION_FULL.
Returns:
XDMPDocInsertStream object to use for inserting.
Throws:
XDBCException - if a database access error occurs.
See Also:
XDMP_ERROR_CORRECTION_NONE, XDMP_ERROR_CORRECTION_FULL

openDocInsertStream

public XDMPDocInsertStream openDocInsertStream(String uri,
                                               Locale locale,
                                               boolean resolveEntities,
                                               XDMPPermission[] permissions,
                                               String[] collections,
                                               int quality,
                                               String namespace,
                                               int repair,
                                               String[] placeKeys)
                                        throws XDBCException
Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions

Opens a document insert stream to insert a document in the database. If multiple documents need to be inserted, a new stream should be opened for each document.

Parameters:
uri - a URI by which the document will be known to the database after it is inserted.
locale - a locale to use when loading the document. If null, the default Java virtual machine local is used.
resolveEntities - boolean if true, external entities embedded in the document should be resolved. The default is false.
permissions - specifies the permissions on the document. An empty array indicates no permissions and null causes the server defaults to be used.
collections - specifies the collections for the document. An empty array indicates no collections and null causes the server defaults to be used.
quality - specifies the integer quality value to assign to the document being loaded. The default value is 0.
namespace - specifies the namespace for elements in the document being loaded. If null, the default namespace is used.
repair - the level of error correction to be performed on the document being loaded. Default is XDMP_ERROR_CORRECTION_FULL.
placeKeys - the String array of keys of the forest into which the document should be inserted. If null or an empty array is specified, the server chooses the forest.
Returns:
XDMPDocInsertStream object to use for inserting.
Throws:
XDBCException - if a database access error occurs.
See Also:
XDMP_ERROR_CORRECTION_NONE, XDMP_ERROR_CORRECTION_FULL

openDocInsertStream

public XDMPDocInsertStream openDocInsertStream(String uri,
                                               Locale locale,
                                               boolean resolveEntities,
                                               XDMPPermission[] permissions,
                                               String[] collections,
                                               int quality,
                                               String namespace,
                                               int repair,
                                               String[] placeKeys,
                                               int format,
                                               String language)
                                        throws XDBCException
Deprecated. As of XDBC 3.0, replaced by XDMPDocOptions

Opens a document insert stream to insert a document in the database. If multiple documents need to be inserted, a new stream should be opened for each document.

Parameters:
uri - a URI by which the document will be known to the database after it is inserted.
locale - a locale to use when loading the document. If null, the default Java virtual machine local is used.
resolveEntities - boolean if true, external entities embedded in the document should be resolved. The default is false.
permissions - specifies the permissions on the document. An empty array indicates no permissions and null causes the server defaults to be used.
collections - specifies the collections for the document. An empty array indicates no collections and null causes the server defaults to be used.
quality - specifies the integer quality value to assign to the document being loaded. The default value is 0.
namespace - specifies the namespace for elements in the document being loaded. If null, the default namespace is used.
repair - the level of error correction to be performed on the document being loaded. Default is XDMP_ERROR_CORRECTION_FULL.
placeKeys - the String array of keys of the forest into which the document should be inserted. If null or an empty array is specified, the server chooses the forest.
format - integer constant specifying which format to treat the document as, when inserted. The default is XDMP_DOC_FORMAT_NONE, which means the uri suffix is used to determine the document type.
language - the String language that will be used to perform searches and stemming on the document. The value of this parameter is usually the first two characters of the Locale (e.g. "en" for English.) as obtained from java.util.Locale.getLanguage(). See ISO 639 for specific values. If null, the default server language is used.
Returns:
XDMPDocInsertStream object to use for inserting.
Throws:
XDBCException - if a database access error occurs.
See Also:
XDMP_ERROR_CORRECTION_NONE, XDMP_ERROR_CORRECTION_FULL, XDMP_DOC_FORMAT_BINARY, XDMP_DOC_FORMAT_TEXT, XDMP_DOC_FORMAT_XML

getAutoCommit

public boolean getAutoCommit()
                      throws XDBCException
Gets the current auto-commit state of this connection.

Specified by:
getAutoCommit in interface XDBCConnection
Returns:
boolean true if auto-commit is enabled (the default) or false if auto-commit is disabled.
Throws:
XDBCException - if a database access error occurs.

getHost

public String getHost()
               throws XDBCException
Gets the host associated with this connection. This host may be hostname or internet address.

Specified by:
getHost in interface XDBCConnection
Returns:
a String hostname for this connection.
Throws:
XDBCException - if a database access error occurs.

getLocale

public Locale getLocale()
                 throws XDBCException
Gets the locale associated with this database connection. The default locale setting for a connection is inherited from the Java runtime environment.

Specified by:
getLocale in interface XDBCConnection
Returns:
the java.util.Locale object associated with this connection.
Throws:
XDBCException - if a database access error occurs.
See Also:
java.util.Locale

getTimeZone

public TimeZone getTimeZone()
                     throws XDBCException
Gets the timezone associated with this database connection. The default timezone setting for a connection is inherited from the Java runtime environment.

Specified by:
getTimeZone in interface XDBCConnection
Returns:
the java.util.Timezone object describing this connection's timezone.
Throws:
XDBCException - if a database access error occurs
See Also:
java.util.TimeZone

getMetaData

public XDBCDatabaseMetaData getMetaData()
                                 throws XDBCException
Gets the metadata regarding this connection's database.

Specified by:
getMetaData in interface XDBCConnection
Returns:
the the XDBCDatabaseMetaData object for this connection.
Throws:
XDBCException - if a database access error occurs.

getPort

public int getPort()
            throws XDBCException
Gets the port number of this connection.

Specified by:
getPort in interface XDBCConnection
Returns:
the integer port number for this connection.
Throws:
XDBCException - if a database access error occurs.

getTransactionIsolation

public int getTransactionIsolation()
                            throws XDBCException
Return the database's default transaction isolation level.

Specified by:
getTransactionIsolation in interface XDBCConnection
Returns:
the integer default transaction isolation level of the database
Throws:
XDBCException - if a database access error occurs.
See Also:
XDBC_TRANSACTION_NONE, XDBC_TRANSACTION_READ_UNCOMMITTED, XDBC_TRANSACTION_READ_COMMITTED, XDBC_TRANSACTION_REPEATABLE_READ, XDBC_TRANSACTION_SERIALIZABLE

setTransactionIsolation

public void setTransactionIsolation(int level)
                             throws XDBCException

NOTE: This method is NOT currently supported.

Attempts to change the transaction isolation level to the one given.

Specified by:
setTransactionIsolation in interface XDBCConnection
Parameters:
level - the integer transaction isolation level to set on this XDBCConnection
Throws:
XDBCException - if a database access error occurs.
UnsupportedOperationException - if an attempt is made to change the transaction isolation level.
See Also:
XDBC_TRANSACTION_NONE, XDBC_TRANSACTION_READ_UNCOMMITTED, XDBC_TRANSACTION_READ_COMMITTED, XDBC_TRANSACTION_REPEATABLE_READ, XDBC_TRANSACTION_SERIALIZABLE

getWarnings

public XDBCWarning getWarnings()
                        throws XDBCException
Returns the first warning reported by calls on this XDMPConnection.

Specified by:
getWarnings in interface XDBCConnection
Returns:
the XDBCWarning object for this connection, or null if no warnings have occurred.
Throws:
XDBCException - if a database access error occurs.

clearWarnings

public void clearWarnings()
                   throws XDBCException
Clears all warnings reported for this XDBCConnection object. After a call to this method, the method getWarnings returns null until a new warning is reported for this XDBCConnection.

Specified by:
clearWarnings in interface XDBCConnection
Throws:
XDBCException - if a database access error occurs.

isClosed

public boolean isClosed()
                 throws XDBCException
Tests if this XDBCConnection is closed.

Specified by:
isClosed in interface XDBCConnection
Returns:
true if this connection has been closed, or false if it is still open.
Throws:
XDBCException - if a database access error occurs.

isReadOnly

public boolean isReadOnly()
                   throws XDBCException
Tests if this XDBCConnection is in read-only mode.

Specified by:
isReadOnly in interface XDBCConnection
Returns:
true if this connection is currently read-only, or false if it can be used for write operations against the database.
Throws:
XDBCException - if a database access error occurs.

rollback

public void rollback()
              throws XDBCException

NOTE: This method is NOT currently supported.

Drop all changes made since the previous commit/rollback and releases any database locks currently held by this XDBCConnection.

Specified by:
rollback in interface XDBCConnection
Throws:
XDBCException - if a database access error occurs.

setAutoCommit

public void setAutoCommit(boolean autoCommit)
                   throws XDBCException

NOTE: This method is NOT currently supported.

Sets this connection's auto-commit mode.

Specified by:
setAutoCommit in interface XDBCConnection
Parameters:
autoCommit - true to enable auto-commit mode for this XDBCConnection; false to disable auto-commit mode.
Throws:
XDBCException - if a database access error occurs.
UnsupportedOperationException - if an attempt is made to change the auto-commit mode.

setLocale

public void setLocale(Locale locale)
               throws XDBCException
Sets the locale for this connection object. The locale is used for all operations on this connection and subordinate objects such as XDBCStatements and XDBCResultSequences.

Generally, the locale needs to be changed before creating a statement or other operation, for which the new locale is needed.

Specified by:
setLocale in interface XDBCConnection
Parameters:
locale - a locale to use when loading the document. If null, the default Java virtual machine local is used.
Throws:
XDBCException - if a database access error occurs.
See Also:
Locale

setTimeZone

public void setTimeZone(TimeZone tz)
                 throws XDBCException
Sets the timezone for this connection object. The timezone is used for all operations on this connection and subordinate objects such as XDBCStatements and XDBCResultSequences.

Generally, the timezone needs to be changed before creating a statement or other operation, for which the new timezone is needed.

Specified by:
setTimeZone in interface XDBCConnection
Parameters:
tz - the java.util.TimeZone object to use for with this connection object.
Throws:
XDBCException - if a database access error occurs
See Also:
TimeZone

setReadOnly

public void setReadOnly(boolean readOnly)
                 throws XDBCException

NOTE: This method is NOT currently supported.

Puts this connection in read-only mode as a hint to enable database optimizations.

Specified by:
setReadOnly in interface XDBCConnection
Parameters:
readOnly - true to enable read-only mode for this XDBCConnection; false to disable read-only mode.
Throws:
XDBCException - if a database access error occurs.
UnsupportedOperationException - if an attempt is made to change the read-only mode.

toString

public String toString()
Returns a string representation of the connection object.

Returns:
a string representation of the connection object.

setMaxOpenResultSequences

public static void setMaxOpenResultSequences(int n)
Sets the maximum allowable number of open result sequence objects at any one time. If this number is exceeded, an XDBCException is thrown. The close() method must be called to free up result sequence objects. This number must be a positive integer. The default is 32.

Parameters:
n - the number of open result sequences.

getMaxOpenResultSequences

public static int getMaxOpenResultSequences()
Returns the maximum allowable number of open result sequence objects at any one time

Returns:
the int number of open result sequences.

setMaxOpenDocInsertStreams

public static void setMaxOpenDocInsertStreams(int n)
Sets the maximum allowable number of open doc insert stream objects at any one time. If this number is exceeded, an XDBCException is thrown. The close() method must be called to free up result sequence objects. This number must be a positive integer. The default is 32.

Parameters:
n - the number of open result sequences.

getMaxOpenDocInsertStreams

public static int getMaxOpenDocInsertStreams()
Returns the maximum allowable number of open doc insert stream objects at any one time.

Returns:
the int number of open result sequences.