Detailed Description
ClusterJHelper provides helper methods to bridge between the API and the implementation.
Definition at line 36 of file ClusterJHelper.java.
Member Function Documentation
static <T> T com.mysql.clusterj.ClusterJHelper.getServiceInstance |
( |
Class< T > |
cls | ) |
|
|
inlinestatic |
Locate a service implementation by services lookup of the context class loader.
- Parameters
-
cls | the class of the factory |
- Returns
- the service instance
Definition at line 71 of file ClusterJHelper.java.
static <T> T com.mysql.clusterj.ClusterJHelper.getServiceInstance |
( |
Class< T > |
cls, |
|
|
ClassLoader |
loader |
|
) |
| |
|
inlinestatic |
Locate a service implementation for a service by services lookup of a specific class loader. The first service instance found is returned.
- Parameters
-
cls | the class of the factory |
loader | the class loader for the factory implementation |
- Returns
- the service instance
Definition at line 141 of file ClusterJHelper.java.
static <T> T com.mysql.clusterj.ClusterJHelper.getServiceInstance |
( |
Class< T > |
cls, |
|
|
String |
implementationClassName |
|
) |
| |
|
inlinestatic |
Locate a service implementation for a service. If the implementation name is not null, use it instead of looking up. If the implementation class is not loadable or does not implement the interface, throw an exception.
- Parameters
-
cls | |
implementationClassName | |
- Returns
- the implementation instance for a service
Definition at line 167 of file ClusterJHelper.java.
static <T> List<T> com.mysql.clusterj.ClusterJHelper.getServiceInstances |
( |
Class< T > |
cls, |
|
|
ClassLoader |
loader, |
|
|
StringBuffer |
errorMessages |
|
) |
| |
|
inlinestatic |
Locate all service implementations by services lookup of a specific class loader. Implementations in the services file are instantiated and returned. Failed instantiations are remembered in the errorMessages buffer.
- Parameters
-
cls | the class of the factory |
loader | the class loader for the factory implementation |
errorMessages | a buffer used to hold the error messages |
- Returns
- the service instance
Definition at line 86 of file ClusterJHelper.java.
static SessionFactory com.mysql.clusterj.ClusterJHelper.getSessionFactory |
( |
Map |
props | ) |
|
|
inlinestatic |
Locate a SessionFactory implementation by services lookup. The class loader used is the thread's context class loader.
- Parameters
-
props | properties of the session factory |
- Returns
- the session factory
- Exceptions
-
ClusterFatalUserException | if the connection to the cluster cannot be made |
Definition at line 45 of file ClusterJHelper.java.
static SessionFactory com.mysql.clusterj.ClusterJHelper.getSessionFactory |
( |
Map |
props, |
|
|
ClassLoader |
loader |
|
) |
| |
|
inlinestatic |
Locate a SessionFactory implementation by services lookup of a specific class loader. The properties are a Map that might contain implementation-specific properties plus standard properties.
- Parameters
-
props | the properties for the factory |
loader | the class loader for the factory implementation |
- Returns
- the session factory
- Exceptions
-
ClusterFatalUserException | if the connection to the cluster cannot be made |
Definition at line 58 of file ClusterJHelper.java.
The documentation for this class was generated from the following file: