org.hibernate.cache

Class UpdateTimestampsCache


public class UpdateTimestampsCache
extends java.lang.Object

Tracks the timestamps of the most recent updates to particular tables. It is important that the cache timeout of the underlying cache implementation be set to a higher value than the timeouts of any of the query caches. In fact, we recommend that the the underlying cache not be configured for expiry at all. Note, in particular, that an LRU cache expiry policy is never appropriate.
Authors:
Gavin King
Mikheil Kapanadze

Field Summary

static String
REGION_NAME

Constructor Summary

UpdateTimestampsCache(Settings settings, Properties props)

Method Summary

void
clear()
void
destroy()
TimestampsRegion
getRegion()
void
invalidate(Serializable[] spaces)
boolean
isUpToDate(Set spaces, Long timestamp)
void
preinvalidate(Serializable[] spaces)
String
toString()

Field Details

REGION_NAME

public static final String REGION_NAME

Constructor Details

UpdateTimestampsCache

public UpdateTimestampsCache(Settings settings,
                             Properties props)
            throws HibernateException

Method Details

clear

public void clear()
            throws CacheException

destroy

public void destroy()

getRegion

public TimestampsRegion getRegion()

invalidate

public void invalidate(Serializable[] spaces)
            throws CacheException

isUpToDate

public boolean isUpToDate(Set spaces,
                          Long timestamp)
            throws HibernateException

preinvalidate

public void preinvalidate(Serializable[] spaces)
            throws CacheException

toString

public String toString()