Package org.hibernate.cache.spi
Interface TimestampsCache
-
- All Superinterfaces:
UpdateTimestampsCache
public interface TimestampsCache extends UpdateTimestampsCache
Wrapper for aTimestampsRegion
adding handling of stale results
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
clear()
Clear the update-timestamps data.default void
destroy()
Destroys the cache.TimestampsRegion
getRegion()
The region used to store all timestamps datadefault void
invalidate(java.io.Serializable[] spaces, SharedSessionContractImplementor session)
Perform invalidation.void
invalidate(java.lang.String[] spaces, SharedSessionContractImplementor session)
Perform invalidation of the passed spaces (table names) against the timestamps region databoolean
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.default boolean
isUpToDate(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 void
preInvalidate(java.io.Serializable[] spaces, SharedSessionContractImplementor session)
Perform pre-invalidation.void
preInvalidate(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:
getRegion
in 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:UpdateTimestampsCache
Perform pre-invalidation.- Specified by:
preInvalidate
in interfaceUpdateTimestampsCache
- Parameters:
spaces
- The spaces to pre-invalidate
-
invalidate
default void invalidate(java.io.Serializable[] spaces, SharedSessionContractImplementor session)
Description copied from interface:UpdateTimestampsCache
Perform invalidation.- Specified by:
invalidate
in 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:UpdateTimestampsCache
Perform an up-to-date check for the given set of query spaces.- Specified by:
isUpToDate
in interfaceUpdateTimestampsCache
- Parameters:
spaces
- The spaces to checktimestamp
- The timestamp against which to check.
-
clear
default void clear() throws CacheException
Description copied from interface:UpdateTimestampsCache
Clear the update-timestamps data.- Specified by:
clear
in interfaceUpdateTimestampsCache
- Throws:
CacheException
- Indicates problem delegating call to underlying region.
-
destroy
default void destroy()
Description copied from interface:UpdateTimestampsCache
Destroys the cache.- Specified by:
destroy
in interfaceUpdateTimestampsCache
-
-