Class DefaultConnectionFactory
- java.lang.Object
-
- com.tangosol.coherence.transaction.DefaultConnectionFactory
-
- All Implemented Interfaces:
ConnectionFactory
public class DefaultConnectionFactory extends Object implements ConnectionFactory
Connection factory used to obtain a logical connection to a Coherence cache service.- Since:
- Coherence 3.6
- Author:
- tb 2009.09.13
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tangosol.coherence.transaction.ConnectionFactory
ConnectionFactory.ConnectionSpec
-
-
Constructor Summary
Constructors Constructor Description DefaultConnectionFactory()
Construct a connection factory.DefaultConnectionFactory(String sConfigURI)
Construct a connection factory based on the specified configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Connection
createConnection()
Create a connection to a Coherence data grid.Connection
createConnection(ConnectionFactory.ConnectionSpec connectionSpec)
Create a connection to a Coherence data grid using the specifiedconnection specification
.Connection
createConnection(ClassLoader loader)
Create a connection to a Coherence data grid.Connection
createConnection(String sServiceName)
Create a connection to a Coherence data grid.Connection
createConnection(String sServiceName, ClassLoader loader)
Create a connection to a Coherence data grid.
-
-
-
Constructor Detail
-
DefaultConnectionFactory
public DefaultConnectionFactory()
Construct a connection factory.
-
DefaultConnectionFactory
public DefaultConnectionFactory(String sConfigURI)
Construct a connection factory based on the specified configuration.- Parameters:
sConfigURI
- the configuration URI
-
-
Method Detail
-
createConnection
public Connection createConnection()
Create a connection to a Coherence data grid. The returned connection is associated with a default cache service. All caches obtained through this connection will be associated with this default cache service.- Specified by:
createConnection
in interfaceConnectionFactory
- Returns:
- a connection to a Coherence data grid
-
createConnection
public Connection createConnection(String sServiceName)
Create a connection to a Coherence data grid. The returned connection is associated with a cache service specified by the given service name. All caches obtained through this connection will be associated with this cache service.- Specified by:
createConnection
in interfaceConnectionFactory
- Parameters:
sServiceName
- the name of the cache service to be associated with the connection; must be specified in a "transactional-scheme" configuration element- Returns:
- a connection to a Coherence data grid
-
createConnection
public Connection createConnection(ClassLoader loader)
Create a connection to a Coherence data grid. The returned connection is associated with a default cache service. All caches obtained through this connection will be associated with this default cache service.- Specified by:
createConnection
in interfaceConnectionFactory
- Parameters:
loader
- class loader that should be used to configure the connection- Returns:
- a connection to a Coherence data grid
-
createConnection
public Connection createConnection(String sServiceName, ClassLoader loader)
Create a connection to a Coherence data grid. The returned connection is associated with a cache service specified by the given service name. All caches obtained through this connection will be associated with this cache service.- Specified by:
createConnection
in interfaceConnectionFactory
- Parameters:
sServiceName
- the name of the cache service to be associated with the connection; must be specified in a "transactional-scheme" configuration elementloader
- class loader that should be used to configure the connection- Returns:
- a connection to a Coherence data grid
-
createConnection
public Connection createConnection(ConnectionFactory.ConnectionSpec connectionSpec)
Create a connection to a Coherence data grid using the specifiedconnection specification
. The returned connection is associated with a cache service specified by the service name in the given connection specification. All caches obtained through this connection will be associated with this cache service.- Specified by:
createConnection
in interfaceConnectionFactory
- Parameters:
connectionSpec
- the connection specification- Returns:
- a connection to a Coherence data grid
-
-