类 CollectionCacheInvalidator
- java.lang.Object
-
- org.hibernate.cache.internal.CollectionCacheInvalidator
-
- 所有已实现的接口:
Serializable,PostDeleteEventListener,PostInsertEventListener,PostUpdateEventListener,Integrator
public class CollectionCacheInvalidator extends Object implements Integrator, PostInsertEventListener, PostDeleteEventListener, PostUpdateEventListener
Allows the collection cache to be automatically evicted if an element is inserted/removed/updated *without* properly managing both sides of the association (ie, the ManyToOne collection is changed w/o properly managing the OneToMany). For this functionality to be used,AvailableSettings.AUTO_EVICT_COLLECTION_CACHEmust be enabled. For performance reasons, it's disabled by default.- 作者:
- Andreas Berger
- 另请参阅:
- 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 static booleanPROPAGATE_EXCEPTIONExposed for use in testing
-
构造器概要
构造器 构造器 说明 CollectionCacheInvalidator()
-
方法概要
所有方法 实例方法 具体方法 默认方法 修饰符和类型 方法 说明 voiddisintegrate(SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry)Tongue-in-cheek name for a shutdown callback.voidintegrate(Metadata metadata, SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry)Perform integration.voidonPostDelete(PostDeleteEvent event)voidonPostInsert(PostInsertEvent event)voidonPostUpdate(PostUpdateEvent event)booleanrequiresPostCommitHanding(EntityPersister persister)default booleanrequiresPostCommitHandling(EntityPersister persister)Does this listener require that after transaction hooks be registered?
-
-
-
方法详细资料
-
integrate
public void integrate(Metadata metadata, SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry)
从接口复制的说明:IntegratorPerform integration.- 指定者:
integrate在接口中Integrator- 参数:
metadata- The "compiled" representation of the mapping informationsessionFactory- The session factory being createdserviceRegistry- The session factory's service registry
-
disintegrate
public void disintegrate(SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry)
从接口复制的说明:IntegratorTongue-in-cheek name for a shutdown callback.- 指定者:
disintegrate在接口中Integrator- 参数:
sessionFactory- The session factory being closed.serviceRegistry- That session factory's service registry
-
onPostInsert
public void onPostInsert(PostInsertEvent event)
- 指定者:
onPostInsert在接口中PostInsertEventListener
-
requiresPostCommitHanding
public boolean requiresPostCommitHanding(EntityPersister persister)
-
onPostDelete
public void onPostDelete(PostDeleteEvent event)
- 指定者:
onPostDelete在接口中PostDeleteEventListener
-
onPostUpdate
public void onPostUpdate(PostUpdateEvent event)
- 指定者:
onPostUpdate在接口中PostUpdateEventListener
-
requiresPostCommitHandling
public default boolean requiresPostCommitHandling(EntityPersister persister)
Does this listener require that after transaction hooks be registered?- 参数:
persister- The persister for the entity in question.- 返回:
trueif after transaction callbacks should be added.
-
-