Package org.hibernate.cache.spi
Interface TimestampsCache
- All Known Implementing Classes:
TimestampsCacheDisabledImpl,TimestampsCacheEnabledImpl
public interfaceTimestampsCacheTracks invalidation of "query spaces" (tables) for the purpose of determining if a cached query result set is stale. Implementations use aspecial region the second-level cache to store invalidation timestamps.- A query space isinvalidated in the
TimestampsCachewhen a SQL DML statement executed by Hibernate affects the corresponding table. - A cached query result set ischecked for staleness against the
TimestampsCachewhen it is read from aQueryResultsRegionby aQueryResultsCache.
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclear()default voiddestroy()TimestampsRegiongetRegion()The region used to store all timestamp data.voidinvalidate(String[] spaces,SharedSessionContractImplementor session)Perform invalidation of the passed spaces (table names) against the timestamp region data.booleanisUpToDate(String[] spaces,Long timestamp,SharedSessionContractImplementor session)Perform an up-to-date check for the given set of query spaces as part of verifying the validity of cached query results.booleanisUpToDate(Collection<String> spaces,Long timestamp,SharedSessionContractImplementor session)Perform an up-to-date check for the given set of query spaces as part of verifying the validity of cached query results.voidpreInvalidate(String[] spaces,SharedSessionContractImplementor session)Perform pre-invalidation of the passed spaces (table names) against the timestamp region data.
Method Detail
getRegion
TimestampsRegion getRegion()
The region used to store all timestamp data.
preInvalidate
void preInvalidate(String[] spaces,SharedSessionContractImplementor session)
Perform pre-invalidation of the passed spaces (table names) against the timestamp region data.
invalidate
void invalidate(String[] spaces,SharedSessionContractImplementor session)
Perform invalidation of the passed spaces (table names) against the timestamp region data.
isUpToDate
boolean isUpToDate(String[] spaces,Long timestamp,SharedSessionContractImplementor session)
Perform an up-to-date check for the given set of query spaces as part of verifying the validity of cached query results.
isUpToDate
boolean isUpToDate(Collection<String> spaces,Long timestamp,SharedSessionContractImplementor session)
Perform an up-to-date check for the given set of query spaces as part of verifying the validity of cached query results.
clear
default void clear() throwsCacheException
- Throws:
CacheException
destroy
default void destroy()