Purpose: A single session that supports multiple user/clients connection at the same time.
Description: This session supports a shared session that can be used by multiple users or clients in a three-tiered application. It brokers client sessions to allow read and write access through a unified object cache. The server session uses a single connection pool by default, but allows multiple connection pools and separate read/write pools to be configured. All changes to objects and the database must be done through a unit of work acquired from the client session, this allows the changes to occur in a transactional object space and under a exclusive database connection.
Responsibilities:
Server, ClientSession, UnitOfWork
| Modifier and Type | Field and Description |
|---|---|
| protected Map | |
| public static final String | |
| protected ConnectionPolicy | |
| protected int | |
| public static final int | |
| public static final String | |
| protected int | |
| protected ConnectionPool |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | ServerSession(Login login, int minNumberOfPooledConnection, int maxNumberOfPooledConnection)
INTERNAL: Create and return a new server session. |
| public | ServerSession(Login login, ConnectionPolicy defaultConnectionPolicy)
INTERNAL: Create and return a new default server session. |
| public | |
| public | ServerSession(Project project, int minNumberOfPooledConnection, int maxNumberOfPooledConnection)
INTERNAL: Create and return a new server session. |
| public | ServerSession(Project project, int initialNumberOfPooledConnection, int minNumberOfPooledConnection, int maxNumberOfPooledConnection)
INTERNAL: Create and return a new server session. |
| public | ServerSession(Project
the project associated with this session project, int the minimum number of connections in the pool minNumberOfPooledConnection, int the maximum number of connections in the pool maxNumberOfPooledConnection, Login the login used to create the read connection pool readLogin)INTERNAL: Create and return a new server session. |
| public | ServerSession(Project project, int minNumberOfPooledConnection, int maxNumberOfPooledConnection, Login readLogin, Login sequenceLogin)
INTERNAL: Create and return a new server session. |
| public | ServerSession(Project
the project associated with this session project, ConnectionPolicy the default connection policy to be used defaultConnectionPolicy, int the minimum number of connections in the pool initialNumberOfPooledConnections, int the minimum number of connections in the pool minNumberOfPooledConnections, int the maximum number of connections in the pool maxNumberOfPooledConnections, Login the login used to create the read connection pool readLogin, Login the login used to create a connection pool for sequencing sequenceLogin)INTERNAL: Create and return a new server session. |
| public | ServerSession(Project project, ConnectionPolicy defaultConnectionPolicy)
INTERNAL: Create and return a new server session. |
| public | ServerSession(Project project, ConnectionPolicy defaultConnectionPolicy, Login readLogin)
INTERNAL: Create and return a new server session. |
| public | ServerSession(Project project, ConnectionPolicy defaultConnectionPolicy, Login readLogin, Login sequenceLogin)
INTERNAL: Create and return a new server session. |
| Modifier and Type | Method and Description |
|---|---|
| public void | acquireClientConnection(ClientSession clientSession)
INTERNAL: Allocate the client's connection resource. |
| public ClientSession | acquireClientSession()
Implements org. |
| public ClientSession | |
| public ClientSession | acquireClientSession(String poolName)
Implements org. |
| public ClientSession | acquireClientSession(String poolName, Map<K, V> properties)
PUBLIC: Return a client session for this server session. |
| public ClientSession | acquireClientSession(Login login)
Implements org. |
| public ClientSession | acquireClientSession(Login login, Map<K, V> properties)
PUBLIC: Return a client session for this server session. |
| public ClientSession | acquireClientSession(ConnectionPolicy connectionPolicy)
Implements org. |
| public ClientSession | acquireClientSession(ConnectionPolicy connectionPolicy, Map<K, V> properties)
PUBLIC: Return a client session for this server session. |
| public Session | acquireHistoricalSession(AsOfClause
Represents a valid snap shot time. clause)Overrides org. Implements org. |
| public UnitOfWorkImpl | acquireUnitOfWork()
Overrides org. Implements org. |
| public void | addConnectionPool(String poolName, Login login, int minNumberOfConnections, int maxNumberOfConnections)
Implements org. |
| public void | addConnectionPool(ConnectionPool pool)
Implements org. |
| public Accessor | |
| public void | connect()
Overrides org. |
| public void | disconnect()
Overrides org. |
| public Object | executeCall(Call call, AbstractRecord translationRow, DatabaseQuery query)
Overrides org. |
| public Object | executeQuery(DatabaseQuery query, List<E> argumentValues)
Overrides org. Implements org. |
| public List | getAccessors(Call call, AbstractRecord translationRow, DatabaseQuery query)
Overrides org. |
| public ConnectionPool | getConnectionPool(String poolName)
Implements org. |
| public Map | getConnectionPools()
INTERNAL: Connection are pooled to share and restrict the number of database connections. |
| public ConnectionPolicy | getDefaultConnectionPolicy()
Implements org. |
| public ConnectionPool | getDefaultConnectionPool()
Implements org. |
| public AbstractSession | Returns: a session with a live accessormay store session name or reference class for brokers case query)Overrides org. |
| public int | getMaxNumberOfNonPooledConnections()
Implements org. |
| public int | getNumberOfNonPooledConnectionsUsed()
INTERNAL: Return the current number of non-pooled connections in use. |
| public ConnectionPool | getReadConnectionPool()
Implements org. |
| protected Login | getReadLogin()
Overrides org. |
| public SequencingServer | |
| public boolean | isConnected()
Overrides org. Implements org. |
| public boolean | isServerSession()
Overrides org. Implements org. |
| public void | logout()
Overrides org. Implements org. |
| public void | |
| public void | releaseConnectionAfterCall(DatabaseQuery query)
Overrides org. |
| public void | releaseInvalidClientSession(ClientSession clientSession)
INTERNAL: Release any invalid connection in the client session. |
| public void | releaseReadConnection(Accessor connection)
Overrides org. |
| public void | setConnectionPools(Map<String, ConnectionPool> connectionPools)
INTERNAL: Connection are pooled to share and restrict the number of database connections. |
| public void | setDefaultConnectionPolicy(ConnectionPolicy defaultConnectionPolicy)
Implements org. |
| public void | setDefaultConnectionPool()
PUBLIC: Creates and adds "default" connection pool using default parameter values |
| public void | setMaxNumberOfNonPooledConnections(int maxNumberOfNonPooledConnections)
Implements org. |
| public void | setNumberOfNonPooledConnectionsUsed(int numberOfNonPooledConnectionsUsed)
INTERNAL: Set the current number of connections being used that are not from a connection pool. |
| public void | setReadConnectionPool(ConnectionPool readConnectionPool)
Implements org. |
| public void | |
| public void | setSynchronized(boolean synched)
Overrides org. |
| protected void | |
| public void | useExclusiveReadConnectionPool(int minNumerOfConnections, int maxNumerOfConnections)
Implements org. |
| public void | useExclusiveReadConnectionPool(int initialNumberOfConnections, int minNumerOfConnections, int maxNumerOfConnections)
Implements org. |
| public void | useExternalReadConnectionPool()
Implements org. |
| public void | useReadConnectionPool(int minNumerOfConnections, int
As multiple readers can use the same connection
concurrently fewer connections are needed. maxNumerOfConnections)Implements org. |
| public void | useReadConnectionPool(int
connections connected at startup initialNumerOfConnections, int connections that are pooled minNumerOfConnections, int As multiple readers can use the same connection
concurrently fewer connections are needed. maxNumerOfConnections)Implements org. |
| public void | validateQuery(DatabaseQuery query)
Overrides org. |