本文整理了Java中org.hibernate.SessionFactory.evictCollection()
方法的一些代码示例,展示了SessionFactory.evictCollection()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SessionFactory.evictCollection()
方法的具体详情如下:
包路径:org.hibernate.SessionFactory
类名称:SessionFactory
方法名:evictCollection
[英]Evict all entries from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.
[中]从二级缓存中逐出所有条目。这种方法发生在任何交易之外;它立即执行“硬”删除,因此不遵守使用策略的任何事务隔离语义。小心使用。
代码示例来源:origin: org.codehaus.griffon.plugins/griffon-hibernate4-core
@Override
@Deprecated
public void evictCollection(String roleName) throws HibernateException {
delegate.evictCollection(roleName);
}
代码示例来源:origin: picocontainer/picocontainer
/** {@inheritDoc} **/
@Deprecated
public void evictCollection(String roleName) {
delegate.evictCollection(roleName);
}
代码示例来源:origin: picocontainer/picocontainer
/** {@inheritDoc} **/
@Deprecated
public void evictCollection(String roleName, Serializable id) {
delegate.evictCollection(roleName, id);
}
代码示例来源:origin: picocontainer/picocontainer
/** {@inheritDoc} **/
@Deprecated
public void evictCollection(String roleName, Serializable id) {
delegate.evictCollection(roleName, id);
}
代码示例来源:origin: org.codehaus.griffon.plugins/griffon-hibernate4-core
@Override
@Deprecated
public void evictCollection(String roleName, Serializable id) throws HibernateException {
delegate.evictCollection(roleName, id);
}
代码示例来源:origin: picocontainer/picocontainer
/** {@inheritDoc} **/
@Deprecated
public void evictCollection(String roleName) {
delegate.evictCollection(roleName);
}
代码示例来源:origin: org.jboss.ejb3/jboss-ejb3-jpa-int
@SuppressWarnings("deprecation")
public void evictCollection(String roleName, Serializable id) throws HibernateException
{
getSessionFactory().evictCollection(roleName, id);
}
代码示例来源:origin: org.jboss.ejb3/jboss-ejb3-jpa-int
@SuppressWarnings("deprecation")
public void evictCollection(String roleName) throws HibernateException
{
getSessionFactory().evictCollection(roleName);
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
public void evictCollection(String roleName, Serializable id)
throws HibernateException {
getImpl().evictCollection(roleName, id);
}
代码示例来源:origin: com.carbonfive/db-support
public void evictCollection(String roleName, Serializable id) throws HibernateException
{
getSessionFactory().evictCollection(roleName, id);
}
代码示例来源:origin: hibernate/hibernate
public void evictCollection(String roleName, Serializable id)
throws HibernateException {
getImpl().evictCollection(roleName, id);
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
public void evictCollection(String roleName, Serializable id)
throws HibernateException {
getImpl().evictCollection(roleName, id);
}
代码示例来源:origin: org.grails/grails-hibernate
@Deprecated
public void evictCollection(String roleName, Serializable id) throws HibernateException {
getCurrentSessionFactory().evictCollection(roleName, id);
}
代码示例来源:origin: org.grails/grails-hibernate
@Deprecated
public void evictCollection(String roleName) throws HibernateException {
getCurrentSessionFactory().evictCollection(roleName);
}
代码示例来源:origin: com.carbonfive/db-support
public void evictCollection(String roleName) throws HibernateException
{
getSessionFactory().evictCollection(roleName);
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
public void evictCollection(String roleName, Serializable id)
throws HibernateException {
getImpl().evictCollection(roleName, id);
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
public void evictCollection(String roleName) throws HibernateException {
getImpl().evictCollection(roleName);
}
代码示例来源:origin: org.jbpm.jbpm3/jbpm-jpdl
public static void clearHibernateCache(SessionFactory sessionFactory) {
sessionFactory.evictQueries();
Map classMetadata = sessionFactory.getAllClassMetadata();
for (Iterator iter = classMetadata.keySet().iterator(); iter.hasNext();) {
String entityName = (String) iter.next();
sessionFactory.evictEntity(entityName);
}
Map collectionMetadata = sessionFactory.getAllCollectionMetadata();
for (Iterator iter = collectionMetadata.keySet().iterator(); iter.hasNext();) {
String collectionName = (String) iter.next();
sessionFactory.evictCollection(collectionName);
}
}
代码示例来源:origin: riotfamily/riot
protected void evictCacheEntry(String entity, boolean collection) {
if (collection) {
sessionFactory.evictCollection(entity);
}
else {
Class<?> clazz = SpringUtils.classForName(entity);
sessionFactory.evict(clazz);
}
}
}
代码示例来源:origin: com.carbonfive/db-support
public static void clearSecondLevelCache(SessionFactory sessionFactory) throws HibernateException
{
for (String clazz : (Set<String>) sessionFactory.getAllClassMetadata().keySet())
{
sessionFactory.evictEntity(clazz);
}
for (String rolename : (Set<String>) sessionFactory.getAllCollectionMetadata().keySet())
{
sessionFactory.evictCollection(rolename);
}
sessionFactory.evictQueries();
}
}
内容来源于网络,如有侵权,请联系作者删除!