Examples of evictEntityRegions()


Examples of org.hibernate.Cache.evictEntityRegions()

     * @param emf
     * @see org.hibernate.ejb.EntityManagerFactoryImpl.JPACache#evictAll()
     */
    public static void evictLevel2Cache(EntityManagerFactory emf) {
        Cache cache = HibernateUtils.getCache(emf);
        cache.evictEntityRegions();
        cache.evictCollectionRegions();
        cache.evictDefaultQueryRegion();
        cache.evictQueryRegions();
        cache.evictNaturalIdRegions();
    }
View Full Code Here

Examples of org.hibernate.Cache.evictEntityRegions()

        boolean entityIdsEmpty = ArrayUtils.isEmpty(entityIds);

        Cache cache = HibernateUtils.getCache(em);

        if(entityNamesEmpty && entityIdsEmpty) {
            cache.evictEntityRegions();
        } else if(entityIdsEmpty) {
            for(String entityName : entityNames) {
                cache.evictEntityRegion(entityName);
            }
        } else {
View Full Code Here

Examples of org.hibernate.Cache.evictEntityRegions()

        boolean collectionEntityIdsEmpty = ArrayUtils.isEmpty(collectionEntityIds);

        Cache cache = HibernateUtils.getCache(em);

        if(collectionRoleNamesEmpty && collectionEntityIdsEmpty) {
            cache.evictEntityRegions();
        } else if(collectionEntityIdsEmpty) {
            for(String collectionRoleName : collectionRoleNames) {
                cache.evictCollectionRegion(collectionRoleName);
            }
        } else {
View Full Code Here

Examples of org.hibernate.Cache.evictEntityRegions()

        final String previousServerName = eventAggregatorStatus.getServerName();
        if (previousServerName != null && !serverName.equals(previousServerName)) {
            this.logger.debug("Last aggregation run on {} clearing all aggregation caches", previousServerName);
            final Session session = getEntityManager().unwrap(Session.class);
            final Cache cache = session.getSessionFactory().getCache();
            cache.evictEntityRegions();
        }
       
        eventAggregatorStatus.setServerName(serverName);
       
        //Calculate date range for aggregation
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.