K
- Connection keyC
- Actual connector object that represents a connectionpublic interface ConnectionManager<K,C extends Connection>
Connector
annotated class that will infuse it with connection management capabilities. It can receive a PoolingProfile
which is a configuration object used to define the connection pooling parameters.Modifier and Type | Method and Description |
---|---|
C |
acquireConnection(K connectorKey)
Borrow a connection from the pool
|
void |
destroyConnection(K connectorKey,
C connector)
Destroy a connection
|
org.mule.config.PoolingProfile |
getConnectionPoolingProfile()
Retrieve the connection pooling profile
|
K |
getDefaultConnectionKey()
Retrieve the default connection key
|
org.mule.api.retry.RetryPolicyTemplate |
getRetryPolicyTemplate()
Retrieve the reconnection strategy used by this connection
manager.
|
void |
releaseConnection(K connectorKey,
C connector)
Return a connection to the pool
|
void |
setConnectionPoolingProfile(org.mule.config.PoolingProfile value)
Set the connection pooling profile
|
void setConnectionPoolingProfile(org.mule.config.PoolingProfile value)
value
- PoolingProfile representing the pooling parametersorg.mule.config.PoolingProfile getConnectionPoolingProfile()
C acquireConnection(K connectorKey) throws Exception
connectorKey
- Key used to borrow the connectorException
- If the connection cannot be createdvoid releaseConnection(K connectorKey, C connector) throws Exception
connectorKey
- Key used to borrow the connectorconnector
- connector to be returned to the poolException
- If the connection cannot be returnedvoid destroyConnection(K connectorKey, C connector) throws Exception
connectorKey
- Key used to borrow the connectorconnector
- Connector to be destroyedException
- If the connection could not be destroyed.K getDefaultConnectionKey()
org.mule.api.retry.RetryPolicyTemplate getRetryPolicyTemplate()
RetryPolicyTemplate
Copyright © 2010–2015 MuleSoft, Inc.. All rights reserved.