类 ConnectionProviderInitiator
- java.lang.Object
-
- org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator
-
public class ConnectionProviderInitiator extends Object implements StandardServiceInitiator<ConnectionProvider>
Instantiates and configures an appropriateConnectionProvider.- 作者:
- Gavin King, Steve Ebersole, Brett Meyer
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringAGROAL_STRATEGYThe strategy for agroal connection poolingstatic StringC3P0_STRATEGYThe strategy for c3p0 connection poolingstatic StringHIKARI_STRATEGYThe strategy for hikari connection poolingstatic StringINJECTION_DATANo idea.static ConnectionProviderInitiatorINSTANCESingleton accessstatic StringPROXOOL_STRATEGYThe strategy for proxool connection poolingstatic StringVIBUR_STRATEGYThe strategy for vibur connection pooling
-
构造器概要
构造器 构造器 说明 ConnectionProviderInitiator()
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static IntegerextractIsolation(Map settings)static PropertiesgetConnectionProperties(Map<?,?> properties)Build the connection properties capable of being passed to theDriverManager.getConnection(java.lang.String, java.util.Properties)forms takingPropertiesargument.Class<ConnectionProvider>getServiceInitiated()Obtains the service role initiated by this initiator.ConnectionProviderinitiateService(Map configurationValues, ServiceRegistryImplementor registry)Initiates the managed service.static IntegerinterpretIsolation(Object setting)static StringtoIsolationConnectionConstantName(Integer isolation)Gets theConnectionconstant name corresponding to the given isolation.static StringtoIsolationNiceName(Integer isolation)Get the name of a JDBC transaction isolation level
-
-
-
字段详细资料
-
INSTANCE
public static final ConnectionProviderInitiator INSTANCE
Singleton access
-
C3P0_STRATEGY
public static final String C3P0_STRATEGY
The strategy for c3p0 connection pooling- 另请参阅:
- 常量字段值
-
PROXOOL_STRATEGY
public static final String PROXOOL_STRATEGY
The strategy for proxool connection pooling- 另请参阅:
- 常量字段值
-
HIKARI_STRATEGY
public static final String HIKARI_STRATEGY
The strategy for hikari connection pooling- 另请参阅:
- 常量字段值
-
VIBUR_STRATEGY
public static final String VIBUR_STRATEGY
The strategy for vibur connection pooling- 另请参阅:
- 常量字段值
-
AGROAL_STRATEGY
public static final String AGROAL_STRATEGY
The strategy for agroal connection pooling- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
getServiceInitiated
public Class<ConnectionProvider> getServiceInitiated()
从接口复制的说明:ServiceInitiatorObtains the service role initiated by this initiator. Should be unique within a registry- 指定者:
getServiceInitiated在接口中ServiceInitiator<ConnectionProvider>- 返回:
- The service role.
-
initiateService
public ConnectionProvider initiateService(Map configurationValues, ServiceRegistryImplementor registry)
从接口复制的说明:StandardServiceInitiatorInitiates the managed service.- 指定者:
initiateService在接口中StandardServiceInitiator<ConnectionProvider>- 参数:
configurationValues- The configuration values in effectregistry- The service registry. Can be used to locate services needed to fulfill initiation.- 返回:
- The initiated service.
-
getConnectionProperties
public static Properties getConnectionProperties(Map<?,?> properties)
Build the connection properties capable of being passed to theDriverManager.getConnection(java.lang.String, java.util.Properties)forms takingPropertiesargument. We seek out all keys in the passed map which start withhibernate.connection., using them to create a newPropertiesinstance. The keys in this newPropertieshave thehibernate.connection.prefix trimmed.- 参数:
properties- The map from which to build the connection specific properties.- 返回:
- The connection properties.
-
toIsolationConnectionConstantName
public static String toIsolationConnectionConstantName(Integer isolation)
Gets theConnectionconstant name corresponding to the given isolation.- 参数:
isolation- The transaction isolation numeric value.- 返回:
- The corresponding Connection constant name.
- 抛出:
HibernateException- If the given isolation does not map to JDBC standard isolation- 另请参阅:
toIsolationNiceName(java.lang.Integer)
-
toIsolationNiceName
public static String toIsolationNiceName(Integer isolation)
Get the name of a JDBC transaction isolation level- 参数:
isolation- The transaction isolation numeric value.- 返回:
- a nice human-readable name
- 另请参阅:
toIsolationConnectionConstantName(java.lang.Integer)
-
-