Package org.hibernate.cache.spi
Interface TimestampsCache
-
- All Known Implementing Classes:
TimestampsCacheDisabledImpl
,TimestampsCacheEnabledImpl
public interface TimestampsCache
Tracks invalidation of "query spaces" (tables) for the purpose of determining if a cached query result set is stale. Implementations use a special region the second-level cache to store invalidation timestamps.- A query space is invalidated in the
TimestampsCache
when a SQL DML statement executed by Hibernate affects the corresponding table. - A cached query result set is checked for
staleness against the
TimestampsCache
when it is read from aQueryResultsRegion
by aQueryResultsCache
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
clear()
default void
destroy()
TimestampsRegion
getRegion()
The region used to store all timestamp data.void
invalidate(String[] spaces, SharedSessionContractImplementor session)
Perform invalidation of the passed spaces (table names) against the timestamp region data.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.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.void
preInvalidate(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() throws CacheException
- Throws:
CacheException
-
destroy
default void destroy()
-
-