Package org.hibernate.cache.spi
Interface TimestampsCache
-
- All Superinterfaces:
UpdateTimestampsCache
public interface TimestampsCache extends UpdateTimestampsCache
Wrapper for aTimestampsRegionadding handling of stale results
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclear()Clear the update-timestamps data.default voiddestroy()Destroys the cache.TimestampsRegiongetRegion()The region used to store all timestamps datadefault voidinvalidate(java.io.Serializable[] spaces, SharedSessionContractImplementor session)Perform invalidation.voidinvalidate(java.lang.String[] spaces, SharedSessionContractImplementor session)Perform invalidation of the passed spaces (table names) against the timestamps region databooleanisUpToDate(java.lang.String[] spaces, java.lang.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.default booleanisUpToDate(java.util.Set<java.io.Serializable> spaces, java.lang.Long timestamp, SharedSessionContractImplementor session)Perform an up-to-date check for the given set of query spaces.default voidpreInvalidate(java.io.Serializable[] spaces, SharedSessionContractImplementor session)Perform pre-invalidation.voidpreInvalidate(java.lang.String[] spaces, SharedSessionContractImplementor session)Perform pre-invalidation of the passed spaces (table names) against the timestamps region data
-
-
-
Method Detail
-
getRegion
TimestampsRegion getRegion()
The region used to store all timestamps data- Specified by:
getRegionin interfaceUpdateTimestampsCache- Returns:
- The underlying region.
-
preInvalidate
void preInvalidate(java.lang.String[] spaces, SharedSessionContractImplementor session)Perform pre-invalidation of the passed spaces (table names) against the timestamps region data
-
invalidate
void invalidate(java.lang.String[] spaces, SharedSessionContractImplementor session)Perform invalidation of the passed spaces (table names) against the timestamps region data
-
isUpToDate
boolean isUpToDate(java.lang.String[] spaces, java.lang.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.- Parameters:
spaces- The spaces to checktimestamp- The timestamp from the transaction when the query results were cached.session- The session whether this check originated.- Returns:
- Whether all those spaces are up-to-date
-
preInvalidate
default void preInvalidate(java.io.Serializable[] spaces, SharedSessionContractImplementor session)Description copied from interface:UpdateTimestampsCachePerform pre-invalidation.- Specified by:
preInvalidatein interfaceUpdateTimestampsCache- Parameters:
spaces- The spaces to pre-invalidate
-
invalidate
default void invalidate(java.io.Serializable[] spaces, SharedSessionContractImplementor session)Description copied from interface:UpdateTimestampsCachePerform invalidation.- Specified by:
invalidatein interfaceUpdateTimestampsCache- Parameters:
spaces- The spaces to invalidate.
-
isUpToDate
default boolean isUpToDate(java.util.Set<java.io.Serializable> spaces, java.lang.Long timestamp, SharedSessionContractImplementor session)Description copied from interface:UpdateTimestampsCachePerform an up-to-date check for the given set of query spaces.- Specified by:
isUpToDatein interfaceUpdateTimestampsCache- Parameters:
spaces- The spaces to checktimestamp- The timestamp against which to check.
-
clear
default void clear() throws CacheExceptionDescription copied from interface:UpdateTimestampsCacheClear the update-timestamps data.- Specified by:
clearin interfaceUpdateTimestampsCache- Throws:
CacheException- Indicates problem delegating call to underlying region.
-
destroy
default void destroy()
Description copied from interface:UpdateTimestampsCacheDestroys the cache.- Specified by:
destroyin interfaceUpdateTimestampsCache
-
-