Code example for Session

Methods: getSessionFactory

0
     * 
     * @param session 
     * @return Currently used <code>HazelcastInstance</code> or null if an error occurs. 
     */ 
    public static HazelcastInstance getHazelcastInstance(final Session session) {
        return getHazelcastInstance(session.getSessionFactory());
    } 
 
    /** 
     * Tries to extract <code>HazelcastInstance</code> from <code>SessionFactory</code>. 
     * 
     * @param sessionFactory 
     * @return Currently used <code>HazelcastInstance</code> or null if an error occurs. 
     */ 
    public static HazelcastInstance getHazelcastInstance(final SessionFactory sessionFactory) {
        if (!(sessionFactory instanceof SessionFactoryImplementor)) {
            LOGGER.warning("SessionFactory is expected to be instance of SessionFactoryImplementor.");
            return null; 
        } 
        return getHazelcastInstance((SessionFactoryImplementor) sessionFactory);
Connect your IDE to all the code out there  Get Codota for Java