类 SessionFactoryRegistry
- java.lang.Object
-
- org.hibernate.internal.SessionFactoryRegistry
-
public class SessionFactoryRegistry extends Object
A registry of allSessionFactoryinstances for the same classloader as this class. This registry is used for serialization/deserialization as well as JNDI binding.- 作者:
- Steve Ebersole
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classSessionFactoryRegistry.ObjectFactoryImpl
-
字段概要
字段 修饰符和类型 字段 说明 static SessionFactoryRegistryINSTANCESingleton access
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddSessionFactory(String uuid, String name, boolean isNameAlsoJndiName, SessionFactory instance, JndiService jndiService)Adds a SessionFactory to the registryvoidclearRegistrations()SessionFactoryfindSessionFactory(String uuid, String name)SessionFactorygetNamedSessionFactory(String name)Get a registered SessionFactory by nameSessionFactorygetSessionFactory(String uuid)booleanhasRegistrations()Does this registry currently contain registrations?voidremoveSessionFactory(String uuid, String name, boolean isNameAlsoJndiName, JndiService jndiService)Remove a previously added SessionFactory
-
-
-
字段详细资料
-
INSTANCE
public static final SessionFactoryRegistry INSTANCE
Singleton access
-
-
方法详细资料
-
addSessionFactory
public void addSessionFactory(String uuid, String name, boolean isNameAlsoJndiName, SessionFactory instance, JndiService jndiService)
Adds a SessionFactory to the registry- 参数:
uuid- The uuid under which to register the SessionFactoryname- The optional name under which to register the SessionFactoryisNameAlsoJndiName- Is name, if provided, also a JNDI name?instance- The SessionFactory instancejndiService- The JNDI service, so we can register a listener if name is a JNDI name
-
removeSessionFactory
public void removeSessionFactory(String uuid, String name, boolean isNameAlsoJndiName, JndiService jndiService)
Remove a previously added SessionFactory- 参数:
uuid- The uuidname- The optional nameisNameAlsoJndiName- Is name, if provided, also a JNDI name?jndiService- The JNDI service
-
getNamedSessionFactory
public SessionFactory getNamedSessionFactory(String name)
Get a registered SessionFactory by name- 参数:
name- The name- 返回:
- The SessionFactory
-
getSessionFactory
public SessionFactory getSessionFactory(String uuid)
-
findSessionFactory
public SessionFactory findSessionFactory(String uuid, String name)
-
hasRegistrations
public boolean hasRegistrations()
Does this registry currently contain registrations?- 返回:
- true/false
-
clearRegistrations
public void clearRegistrations()
-
-