Key
- Connection keyAdapter
- Actual connector object that represents a connectionpublic interface ConnectionManagementConnectionManager<Key extends ConnectionManagementConnectionKey,Adapter extends ConnectionManagementConnectorAdapter,Strategy>
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 |
---|---|
Adapter |
acquireConnection(Key connectorKey)
Borrow a connection from the pool
|
void |
destroyConnection(Key connectorKey,
Adapter connector)
Destroy a connection
|
ConnectionManagementConnectionAdapter |
getConnectionAdapter(ConnectionManagementConnectorAdapter adapter) |
Key |
getConnectionKey(org.mule.api.processor.MessageProcessor messageProcessor,
org.mule.api.MuleEvent event) |
Key |
getDefaultConnectionKey()
Retrieve the default connection key
|
Key |
getEvaluatedConnectionKey(org.mule.api.MuleEvent event)
Retrieve the connection key evaluated with the received mule event
|
org.mule.api.MuleContext |
getMuleContext() |
org.mule.api.retry.RetryPolicyTemplate |
getRetryPolicyTemplate()
Retrieve the reconnection strategy used by this connection
manager.
|
ConnectionManagementConnectionAdapter |
newConnection() |
ConnectionManagementConnectorAdapter |
newConnector(ConnectionManagementConnectionAdapter<Strategy,Key> connection) |
void |
releaseConnection(Key connectorKey,
Adapter connector)
Return a connection to the pool
|
Adapter acquireConnection(Key connectorKey) throws Exception
connectorKey
- Key used to borrow the connectorException
- If the connection cannot be createdvoid releaseConnection(Key connectorKey, Adapter connector) throws Exception
connectorKey
- Key used to borrow the connectorconnector
- connector to be returned to the poolException
- If the connection cannot be returnedvoid destroyConnection(Key connectorKey, Adapter connector) throws Exception
connectorKey
- Key used to borrow the connectorconnector
- Connector to be destroyedException
- If the connection could not be destroyed.Key getDefaultConnectionKey()
Key getEvaluatedConnectionKey(org.mule.api.MuleEvent event) throws Exception
Exception
org.mule.api.retry.RetryPolicyTemplate getRetryPolicyTemplate()
RetryPolicyTemplate
Key getConnectionKey(org.mule.api.processor.MessageProcessor messageProcessor, org.mule.api.MuleEvent event) throws Exception
Exception
ConnectionManagementConnectionAdapter newConnection()
org.mule.api.MuleContext getMuleContext()
ConnectionManagementConnectorAdapter newConnector(ConnectionManagementConnectionAdapter<Strategy,Key> connection)
ConnectionManagementConnectionAdapter getConnectionAdapter(ConnectionManagementConnectorAdapter adapter)
Copyright © 2010–2015 MuleSoft, Inc.. All rights reserved.