MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
com.mysql.clusterj.ClusterJHelper Class Reference

Static Public Member Functions

static SessionFactory getSessionFactory (Map props)
static SessionFactory getSessionFactory (Map props, ClassLoader loader)
static< T > T getServiceInstance (Class< T > cls)
static< T > List< T > getServiceInstances (Class< T > cls, ClassLoader loader, StringBuffer errorMessages)
static< T > T getServiceInstance (Class< T > cls, ClassLoader loader)
static< T > T getServiceInstance (Class< T > cls, String implementationClassName)

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
clsthe class of the factory
Returns
the service instance

Definition at line 71 of file ClusterJHelper.java.

Here is the caller graph for this function:

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
clsthe class of the factory
loaderthe class loader for the factory implementation
Returns
the service instance

Definition at line 141 of file ClusterJHelper.java.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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
clsthe class of the factory
loaderthe class loader for the factory implementation
errorMessagesa buffer used to hold the error messages
Returns
the service instance

Definition at line 86 of file ClusterJHelper.java.

Here is the caller graph for this function:

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
propsproperties of the session factory
Returns
the session factory
Exceptions
ClusterFatalUserExceptionif the connection to the cluster cannot be made

Definition at line 45 of file ClusterJHelper.java.

Here is the caller graph for this function:

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
propsthe properties for the factory
loaderthe class loader for the factory implementation
Returns
the session factory
Exceptions
ClusterFatalUserExceptionif the connection to the cluster cannot be made

Definition at line 58 of file ClusterJHelper.java.

Here is the call graph for this function:


The documentation for this class was generated from the following file: