public interface Connection
extends java.lang.AutoCloseable
To create a Connection object, call
DataGrid.connect
.
A program that creates a connection must explicitly call
Connection.close
to reclaim its resources.
This interface is implemented internally. Applications do not implement this interface.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TIBDG_CONNECTION_HTTPS_CONNECTION_TRUST_EVERYONE
Property name to Trust any realm server; property value constant.
|
static java.lang.String |
TIBDG_CONNECTION_HTTPS_CONNECTION_USE_SPECIFIED_TRUST_FILE
Trust a realm server if its certificate is in a trust file; property value constant.
|
static java.lang.String |
TIBDG_CONNECTION_PROPERTY_DOUBLE_CONNECT_WAIT_TIME
Property name for initial connection timeout; double.
|
static java.lang.String |
TIBDG_CONNECTION_PROPERTY_DOUBLE_TIMEOUT
Property name for connection timeout; double.
|
static java.lang.String |
TIBDG_CONNECTION_PROPERTY_STRING_SECONDARY_REALM
Property name for specifying secondary/backup realm server; string.
|
static java.lang.String |
TIBDG_CONNECTION_PROPERTY_STRING_TRUST_FILE
Property name for secure realm server trust file; string.
|
static java.lang.String |
TIBDG_CONNECTION_PROPERTY_STRING_TRUST_TYPE
Property name for secure realm server trust type; long.
|
static java.lang.String |
TIBDG_CONNECTION_PROPERTY_STRING_USERNAME
Property name for realm server username; string.
|
static java.lang.String |
TIBDG_CONNECTION_PROPERTY_STRING_USERPASSWORD
Property name for realm server password; string.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close a connection object.
|
Session |
createSession(java.util.Properties props)
Create a session object to perform operations.
|
GridMetadata |
getGridMetadata()
Retrieve the current data grid metadata in an object.
|
GridMetadata |
getGridMetadata(java.util.Properties props)
Retrieve the current data grid metadata in an object.
|
static final java.lang.String TIBDG_CONNECTION_PROPERTY_DOUBLE_CONNECT_WAIT_TIME
When connecting to a data grid,
supply this property to DataGrid.connect
This value sets the fixed amount of time the call will wait inside
DataGrid.connect while it collects proxy responses.
The value must be set to greater than the client-proxy roundtrip time
or the connection will fail and must be retried. Default is 0.1 seconds.
static final java.lang.String TIBDG_CONNECTION_PROPERTY_DOUBLE_TIMEOUT
When connecting to a data grid,
supply this property to DataGrid.connect
Its value determines
how long all calls, other than DataGrid.connect, block waiting for the data grid to respond.
Default is 5.0 seconds.
static final java.lang.String TIBDG_CONNECTION_PROPERTY_STRING_USERNAME
Supply this property to DataGrid.connect
if using a secure realm server.
static final java.lang.String TIBDG_CONNECTION_PROPERTY_STRING_USERPASSWORD
DataGrid.connect
if using a secure realm server.static final java.lang.String TIBDG_CONNECTION_PROPERTY_STRING_SECONDARY_REALM
DataGrid.connect
if using a secondary/backup realm serverstatic final java.lang.String TIBDG_CONNECTION_HTTPS_CONNECTION_TRUST_EVERYONE
Connection.TIBDG_CONNECTION_PROPERTY_STRING_TRUST_TYPE
in the method DataGrid.connect
.
The client trusts any realm server without
verifying trust in the server's certificate.
Do not use this value except for
convenience in development and testing.
It is not secure.static final java.lang.String TIBDG_CONNECTION_HTTPS_CONNECTION_USE_SPECIFIED_TRUST_FILE
Connection.TIBDG_CONNECTION_PROPERTY_STRING_TRUST_TYPE
in the method DataGrid.connect
.
The client trusts the realm server based on the
trust file
created by the realm server
and distributed by the administrator.
Specify the file path of the trust file
in the property
Connection.TIBDG_CONNECTION_PROPERTY_STRING_TRUST_FILE
static final java.lang.String TIBDG_CONNECTION_PROPERTY_STRING_TRUST_TYPE
DataGrid.connect
.
Its value determines
trust in the realm server's certificate.
Connection.TIBDG_CONNECTION_HTTPS_CONNECTION_TRUST_EVERYONE
Connection.TIBDG_CONNECTION_HTTPS_CONNECTION_USE_SPECIFIED_TRUST_FILE
static final java.lang.String TIBDG_CONNECTION_PROPERTY_STRING_TRUST_FILE
DataGrid.connect
.
If the grid connect call specifies the trust type as
Connection.TIBDG_CONNECTION_HTTPS_CONNECTION_USE_SPECIFIED_TRUST_FILE
use this property to indicate the location of the trust file.Session createSession(java.util.Properties props) throws DataGridException
A session object provides the context for a thread of operations involving grid resources.
The session object is NOT thread-safe. Do not invoke multiple operations on a single session using more than one thread. Behavior is not defined if this happens.
props
- Optional, null to omit
DataGridException
- in case of failuresGridMetadata getGridMetadata(java.util.Properties props) throws DataGridException
A grid metadata object contains information about the data grid including name, version, and additional metadata about tables.
The information in a grid metadata object will be current when the request returns and will not be updated after that point.
A grid metadata object must be closed to release internal state and no further access should be made to the grid metadata object or any nested objects after it has been closed.
props
- Optional, null to omitDataGridException
- in case of failuresGridMetadata getGridMetadata() throws DataGridException
A grid metadata object contains information about the data grid including name, version, and additional metadata about tables.
The information in a grid metadata object will be current when the request returns and will not be updated after that point.
A grid metadata object must be closed to release internal state and no further access should be made to the grid metadata object or any nested objects after it has been closed.
DataGridException
- in case of failuresvoid close() throws DataGridException
Releases all resources associated with this connection object.
Note that all resources created or opened by this object are invalidated by this call. These resources should be destroyed or closed before closing this connection.
close
in interface java.lang.AutoCloseable
DataGridException
- in case of failures