Top Description Methods
org.hibernate.cache.spi

public Interface TimestampsCache

extends UpdateTimestampsCache
Known Direct Implementers
org.hibernate.cache.internal.TimestampsCacheDisabledImpl, org.hibernate.cache.internal.TimestampsCacheEnabledImpl
Imports
java.io.Serializable, java.util.Set, java.util.function.Consumer, org.hibernate.cache.CacheException, org.hibernate.engine.spi.SharedSessionContractImplementor

Deprecated

as a consequence of UpdateTimestampsCache being deprecated. See corresponding docs for further information.

Wrapper for a TimestampsRegion adding handling of stale results
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public default void
clear()

Implements org.hibernate.cache.spi.UpdateTimestampsCache.clear.

Clear the update-timestamps data.
public default void
public TimestampsRegion
getRegion()

Redeclares org.hibernate.cache.spi.UpdateTimestampsCache.getRegion.

The region used to store all timestamps data
public void
invalidate(String[] spaces, SharedSessionContractImplementor session)

Perform invalidation of the passed spaces (table names) against the timestamps region data

public default void
invalidate(Serializable[]
The spaces to invalidate.
spaces
,
SharedSessionContractImplementor session)

Implements org.hibernate.cache.spi.UpdateTimestampsCache.invalidate.

Perform invalidation.
public boolean

Returns:

Whether all those spaces are up-to-date
isUpToDate
(String[]
The spaces to check
spaces
,
Long
The timestamp from the transaction when the query results were cached.
timestamp
,
SharedSessionContractImplementor
The session whether this check originated.
session
)

Perform an up-to-date check for the given set of query spaces as part of verifying the validity of cached query results.

public default boolean
isUpToDate(Set<Serializable>
The spaces to check
spaces
,
Long
The timestamp against which to check.
timestamp
,
SharedSessionContractImplementor session)

Implements org.hibernate.cache.spi.UpdateTimestampsCache.isUpToDate.

Perform an up-to-date check for the given set of query spaces.
public void
preInvalidate(String[] spaces, SharedSessionContractImplementor session)

Perform pre-invalidation of the passed spaces (table names) against the timestamps region data

public default void
preInvalidate(Serializable[]
The spaces to pre-invalidate
spaces
,
SharedSessionContractImplementor session)

Implements org.hibernate.cache.spi.UpdateTimestampsCache.preInvalidate.

Perform pre-invalidation.

Method Detail

clearback to summary
public default void clear() throws CacheException

Implements org.hibernate.cache.spi.UpdateTimestampsCache.clear.

Doc from org.hibernate.cache.spi.UpdateTimestampsCache.clear.

Clear the update-timestamps data.

Annotations
@Override
Exceptions
CacheException:
Indicates problem delegating call to underlying region.
destroyback to summary
public default void destroy()

Implements org.hibernate.cache.spi.UpdateTimestampsCache.destroy.

Doc from org.hibernate.cache.spi.UpdateTimestampsCache.destroy.

Destroys the cache.

Annotations
@Override
getRegionback to summary
public TimestampsRegion getRegion()

Redeclares org.hibernate.cache.spi.UpdateTimestampsCache.getRegion.

The region used to store all timestamps data

Returns:TimestampsRegion

Doc from org.hibernate.cache.spi.UpdateTimestampsCache.getRegion.

The underlying region.

invalidateback to summary
public void invalidate(String[] spaces, SharedSessionContractImplementor session)

Perform invalidation of the passed spaces (table names) against the timestamps region data

invalidateback to summary
public default void invalidate(Serializable[] spaces, SharedSessionContractImplementor session)

Implements org.hibernate.cache.spi.UpdateTimestampsCache.invalidate.

Doc from org.hibernate.cache.spi.UpdateTimestampsCache.invalidate.

Perform invalidation.

Parameters
spaces:Serializable[]

The spaces to invalidate.

Annotations
@Override
isUpToDateback to summary
public 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.

Parameters
spaces:String[]

The spaces to check

timestamp:Long

The timestamp from the transaction when the query results were cached.

session:SharedSessionContractImplementor

The session whether this check originated.

Returns:boolean

Whether all those spaces are up-to-date

isUpToDateback to summary
public default boolean isUpToDate(Set<Serializable> spaces, Long timestamp, SharedSessionContractImplementor session)

Implements org.hibernate.cache.spi.UpdateTimestampsCache.isUpToDate.

Doc from org.hibernate.cache.spi.UpdateTimestampsCache.isUpToDate.

Perform an up-to-date check for the given set of query spaces.

Parameters
spaces:Set<Serializable>

The spaces to check

timestamp:Long

The timestamp against which to check.

Annotations
@Override
preInvalidateback to summary
public void preInvalidate(String[] spaces, SharedSessionContractImplementor session)

Perform pre-invalidation of the passed spaces (table names) against the timestamps region data

preInvalidateback to summary
public default void preInvalidate(Serializable[] spaces, SharedSessionContractImplementor session)

Implements org.hibernate.cache.spi.UpdateTimestampsCache.preInvalidate.

Doc from org.hibernate.cache.spi.UpdateTimestampsCache.preInvalidate.

Perform pre-invalidation.

Parameters
spaces:Serializable[]

The spaces to pre-invalidate

Annotations
@Override