Launcher/LaunchServer/src/main/java/pro/gravit/launchserver/hibernate/HibernateManager.java

21 lines
570 B
Java
Raw Normal View History

package pro.gravit.launchserver.hibernate;
2019-06-03 13:56:54 +03:00
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.hibernate.SessionFactory;
2019-06-03 13:56:54 +03:00
import pro.gravit.launchserver.LaunchServer;
public class HibernateManager {
2019-06-03 13:56:54 +03:00
private static final Map<LaunchServer, SessionFactory> sessionMap = new ConcurrentHashMap<>();
public static SessionFactory getSessionFactory(LaunchServer srv) {
return sessionMap.get(srv);
};
public static SessionFactory setSessionFactory(LaunchServer srv, SessionFactory fact) {
return sessionMap.get(srv);
};
}