org.hibernate.cache.spi
Class UpdateTimestampsCache
java.lang.Object
org.hibernate.cache.spi.UpdateTimestampsCache
public class UpdateTimestampsCache
- extends 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.
REGION_NAME
public static final String REGION_NAME
UpdateTimestampsCache
public UpdateTimestampsCache(Settings settings,
Properties props,
SessionFactoryImplementor factory)
throws HibernateException
- Throws:
HibernateException
UpdateTimestampsCache
public UpdateTimestampsCache(Settings settings,
Properties props)
throws HibernateException
- Throws:
HibernateException
preInvalidate
public void preInvalidate(Serializable[] spaces,
SessionImplementor session)
throws CacheException
- Perform pre-invalidation.
- Parameters:
spaces
- The spaces to pre-invalidatesession
-
- Throws:
CacheException
- Indicated problem delegating to underlying region.
invalidate
public void invalidate(Serializable[] spaces,
SessionImplementor session)
throws CacheException
- Perform invalidation.
- Parameters:
spaces
- The spaces to pre-invalidatesession
-
- Throws:
CacheException
- Indicated problem delegating to underlying region.
isUpToDate
public boolean isUpToDate(Set<Serializable> spaces,
Long timestamp,
SessionImplementor session)
throws CacheException
- Perform an up-to-date check for the given set of query spaces.
- Parameters:
spaces
- The spaces to checktimestamp
- The timestamp against which to check.session
-
- Returns:
- Whether all those spaces are up-to-date
- Throws:
CacheException
- Indicated problem delegating to underlying region.
clear
public void clear()
throws CacheException
- Throws:
CacheException
destroy
public void destroy()
getRegion
public TimestampsRegion getRegion()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.