|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines the methods and properties for the connection pool. It allows for pooling connections to the server for optimal efficiency. A connection is the medium used to communicate with the MDM server.
The connection pool implementation maintains a minimum number of connections. In the process of reserving a connection, if a connection is available, the connection is immediately returned. If a connection is not available, a new connection is created if the maximum number of connections is not reached, otherwise the request is blocked until a connection is available.
The connection pool implementation also start up a background thread that checks the connections at a fix internal. A connection that is in a bad state, perhaps the MDM server was restarted, is removed.
All connection pools are associated with a connection source. A connection source is simply an identifier for grouping logically related connection pools. Connection source is mainly use for server notifications.
ConnectionPoolFactory,
SimpleConnectionFactory| Field Summary | |
static java.lang.String |
DEFAULT_CLIENT_HOSTNAME
The default client host name. |
static java.lang.String |
DEFAULT_CONNECTION_IDENTITY
The default connection identity. |
static java.lang.String |
DEFAULT_HOSTNAME
The default host name. |
static int |
NO_TIMEOUT
A constants specifying no timeout. |
| Method Summary | |
void |
addConnectionPoolListener(ConnectionPoolListener listener)
Adds a listener for connection pool events. |
void |
freeUnused()
Frees any unused connections in the pool. |
int |
getAvailableCount()
Returns the current number of connections that are not in use. |
int |
getConnectionCount()
Returns the current number of connections that are open. |
java.lang.String |
getConnectionSource()
Returns the connection source identifier. |
java.lang.String |
getHostname()
Returns the host name where the MDM server is running. |
java.lang.String |
getIdentity()
Returns the name/identifier of the connection. |
int |
getMaxConnections()
Returns the maximum number of connections. |
int |
getMinConnections()
Returns the minimum number of connections. |
int |
getPort()
Returns the port number used to communicate with the MDM server. |
int |
getReservedCount()
Returns the current number of connections that are in use. |
int |
getTimeout()
Returns the time out. |
boolean |
isNotificationEnabled()
Deprecated. |
boolean |
isReady()
Indicates whether the connection pool is ready for use. |
void |
removeConnectionPoolListener(ConnectionPoolListener listener)
Removes a listener from a connection pool. |
void |
setMaxConnections(int maxConnections)
Sets the maximum number of connections. |
void |
setMinConnections(int minConnections)
Sets the minimum number of connections. |
void |
setNotificationEnabled(boolean enabled)
Deprecated. this feature was never implemented |
void |
setTimeout(int milliseconds)
Sets the time out for the socket connection. |
| Methods inherited from interface com.sap.mdm.net.ConnectionAccessor |
releaseConnection, reserveConnection, reserveConnection |
| Field Detail |
public static final int NO_TIMEOUT
public static final java.lang.String DEFAULT_HOSTNAME
public static final java.lang.String DEFAULT_CONNECTION_IDENTITY
public static final java.lang.String DEFAULT_CLIENT_HOSTNAME
| Method Detail |
public void freeUnused()
public boolean isNotificationEnabled()
setNotificationEnabled(boolean)public void setNotificationEnabled(boolean enabled)
enabled - the notification statusEventDispatcherpublic int getTimeout()
setTimeout(int)public void setTimeout(int milliseconds)
milliseconds - the timeout in millisecondsgetTimeout()public java.lang.String getHostname()
public java.lang.String getConnectionSource()
public int getPort()
public java.lang.String getIdentity()
public boolean isReady()
public int getMinConnections()
setMinConnections(int)public void setMinConnections(int minConnections)
minConnections - the minimum number of connectionsgetMinConnections()public int getMaxConnections()
setMaxConnections(int)public void setMaxConnections(int maxConnections)
maxConnections - the maximum number of connectionsgetMaxConnections()public int getConnectionCount()
getAvailableCount(),
getReservedCount()public int getAvailableCount()
freeUnused(),
getConnectionCount(),
getReservedCount()public int getReservedCount()
getAvailableCount(),
getConnectionCount()public void addConnectionPoolListener(ConnectionPoolListener listener)
listener - the listenerremoveConnectionPoolListener(ConnectionPoolListener)public void removeConnectionPoolListener(ConnectionPoolListener listener)
listener - the listeneraddConnectionPoolListener(ConnectionPoolListener)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright 2004-2007 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.